[Zope-CMF] Re: Five views / redirects

Chris Withers chris at simplistix.co.uk
Tue Oct 18 06:24:29 EDT 2005


yuppie wrote:
>     def __call__(self):
>         if self.isTuesday():
>             return ZopeTwoPageTemplateFile('tuesday.pt').__of__(self)()
>         return self.index()
> 

Surely the following is going to be better?

      tuesday_pt = ZopeTwoPageTemplateFile('tuesday.pt')

      def __call__(self):
          if self.isTuesday():
              return self.tuesday_pt.__of__(self)()
          return self.index()

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope-CMF mailing list