[Zope3-dev] update called twice for editview

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Sep 13 08:38:40 EDT 2004


On Monday 13 September 2004 08:33, Marius Gedminas wrote:
> Lately I've acquired the habit of moving the view/update call directly
> into the __call__ method of the view class:
>
>     class MyView(BrowserView):
>
>          template = ViewPageTemplateFile('foo.pt')
>
>          def __call__(self):
>              self.status = self.update()
>              return self.template()
>
> The page template uses view/status and does not worry about view/update.

I like this. Maybe we can make this the default behavior for 3.1?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-dev mailing list