[Zope3-Users] Calling PageTemplate in Content object

Marco Mariani marco at sferacarta.com
Thu May 25 05:09:02 EDT 2006


David Johnson wrote:

>>>     orderform = PageTemplateFile('orderform.pt')
>> maybe this attribute ought to be called "template" instead of "orderform" ?
>>
> 
> Does the name make a difference?

Well, no, I was in a hurry, it makes a difference if you inherit from
formlib

but I see you don't define __call__:

class MessageView(object):

    def message(self):
        return '%s %s!' % (self.context.greeting, self.context.subject)

    def __call__(self):
        return '<html><body><big>%s</big></body></html>' % self.message()



More information about the Zope3-users mailing list