In order to try z3c.form under windows (winxpprosp2), I tried Stephan's
instructions below but got an error during the buildout step:
ImportError:
No module named schemaless
(Complete command sequence and error message is attached.) I deviated
from the instructions in only two ways: 1. I
That works great, thank you Thierry
Thierry Florac wrote:
Le mardi 15 janvier 2008 à 07:05 -0500, john saponara a écrit :
I add a Limoservice object, then inside that object add a Car; then I
add a Driver (which contains a Car), and the AddForm offers a dropdown
with '(no value)'
I add a Limoservice object, then inside that object add a Car; then I
add a Driver (which contains a Car), and the AddForm offers a dropdown
with '(no value)' and my Car object. If I select the car from the
dropdown I get an error:
UnpickleableError: Cannot pickle
objects
Whereas if I lea
I get reasonable edit screens for my car and driver classes when I use a
url like "limoService/car1/edit.html" but when I try to add the edit
screens as zmi menu entries I get an error:
File
"C:\Python24\Lib\site-packages\zope\app\publisher\browser\menu.py", line
62, in getMenuItems
re
I want to allow the user to create car and driver objects in a
limoService container. Car objects will stand alone, but each driver
object should contain a car object by reference (not by value) and the
driver add form should allow the user to choose which car the new driver
object will have.
])
I dont really need to access the form instance, but that seems to be a
reasonable way to access the application's container (all drivers and
cars are put into the same 'LimoService' container for now).
So how can I access the list of cars from the widget? And
self.context.model, self.context.nPassengers)
class DriverView(object):
def message(self):
if self.context.car:
carInfo=self.context.car.__dict__
else:
carInfo=None
return 'driver drives car model %s' % (carInfo)
from zope.app.form.browser.widget import SimpleInputWidget
class CarsListWidget(SimpleInputWidget):
def cars(self):
parent=zapi.getParent(self.co
hi,
please point me to an example showing how to use ObjectWidget with a
default add form. in case there is no example, perhaps my failing
attempt below could serve as one, once it's modified to work.
# interfaces.py
from zope.interface import Interf