Log message for revision 79633: Updated manual to reflect reality about Zope 2 security and views.
Changed: U Zope/trunk/lib/python/Products/Five/doc/manual.txt -=- Modified: Zope/trunk/lib/python/Products/Five/doc/manual.txt =================================================================== --- Zope/trunk/lib/python/Products/Five/doc/manual.txt 2007-09-14 11:40:00 UTC (rev 79632) +++ Zope/trunk/lib/python/Products/Five/doc/manual.txt 2007-09-14 12:19:56 UTC (rev 79633) @@ -268,9 +268,6 @@ attribute. Typically this comes from a base class, such as ``BrowserView``. -* They need to be initialized with the Zope 2 security system, as - otherwise you cannot use the view. - * This also means they need to be part of the Zope 2 acquisition system, as this is a requirement for Zope 2 security to function. The ``BrowserView`` base class, available from @@ -283,22 +280,17 @@ from Products.Five import BrowserView class SimpleFolderView(BrowserView): - security = ClassSecurityInfo() - security.declarePublic('eagle') def eagle(self): """Test """ return "The eagle has landed: %s" % self.context.objectIds() - InitializeClass(SimpleFolderView) - Note that it is not a good idea to give a view class its own ``index_html``, as this confuses Five's view lookup machinery. -As you can see, the class is initialized with the Zope 2 security -system. This view uses methods in Python, but you can also use other -Zope 2 mechanisms such as ``PageTemplateFile``. +This view uses methods in Python, but you can also use other Zope 2 mechanisms +such as ``PageTemplateFile``. Finally, we need to hook up the pages through ZCML:: _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins