[Zope3-Users] formlib confusion

Gary Poster gary at zope.com
Thu Apr 6 20:55:19 EDT 2006


On Apr 6, 2006, at 7:27 PM, Alen Stanisic wrote:

> Hi Pete,
>
> I assign templates in view classes when using formlib:
>
> from zope.app.pagetemplate.viewpagetemplatefile import
> ViewPageTemplateFile
> class ConsumerRegistrarForm(form.Form):
>     .
>     .
>     template = ViewPageTemplateFile('registrar.zpt')
>     .
>     .

That's the way you do it, or with a named template, or with a custom  
render method.

>
> I would also be interested to find out if zcml template directive  
> could
> still be used with formlib forms.

Nope.  Maybe you could write a render method that looked in the right  
place; I don't remember those details anymore.

Gary


More information about the Zope3-users mailing list