[Grok-dev] Add forms - one object type to multiple object types

Darryl Cousins darryl at darrylcousins.net.nz
Sat Mar 10 18:45:05 EST 2007


I'm trying out a simple site type app with grok.

I've 3 content types: Site, Section and Page. Add form for page begins::

class Add(grok.AddForm):

So now I can add pages to Sites. But I want also to add them to
Sections. So the Add class needs a different context:

It seems that I need to make a new add class in order to do so, one for
Site and the other for Section.

Using zcml I would have been able to register the add class for both
Sites and Sections. Here (as I see from my low stand point) it seems not
so straight forward.


Kind regards,

More information about the Grok-dev mailing list