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
metal:fill-slot=body
big tal:content=python: view.message()/big
/div
/body
/html
# edit.pt
html metal:use-macro=context/@@standard_macros/view
body
div metal:fill-slot=body tal:content=view
/div
/body
/html
Christophe Combelles wrote:
john saponara a écrit :
hi
, 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 does the
answer differ in add forms vs edit forms?
Thanks!
john saponara wrote
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 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
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 type
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