[z3-five] can't import an interface into a page template
Martijn Faassen
faassen at infrae.com
Wed Nov 17 11:17:21 MET 2004
Tim Hicks wrote:
> I'm trying to get hold of an interface (of the zope3 variety) from a zpt
> so that I can adapt to it. So, my zpt has::
>
> <tal:dummy define="IMessageFlags
> modules/Products.atemail.interfaces.IMessageFlags">
>
Typically I'd say that isn't the business of a page template at all and
that such adaptation should take place in Python code. Add a class to
your template and create a method that can do the adaptation for you.
As to importing stuff into Five zpts; security is turned off so this
should Just Work without any Zope 2 security magic. However, I've never
tried, so I don't even know what the syntax should be. :)
Regards,
Martijn
More information about the z3-five
mailing list