[Zope3-Users] view vs page confused

FB fbo2 at gmx.net
Wed Mar 28 05:54:20 EDT 2007


Hi,

On Tue, Mar 27, 2007 at 06:03:54PM +0200, Dominique Lederer wrote:

[snip]

> so if i create a class which inherits from BrowserView, and then register it via
> zcml as browser:page, it becomes adaptes to IBrowserRequest an turns to a
> BrowserPage (via the on-the-fly created class)? so inheriting from BrowserPage
> instead from BrowserView would make no sense with my example?

It doesn't event make sense to inherit from BrowserView because a browser:page-registered
view-class is just a mixin. A class like this is enough:

class MyView(object):
   def mySpecialMethod(self):
      [...]
   [...]


<browser:page class=".views.MyView" [...] />

Regards,

Frank


More information about the Zope3-users mailing list