[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/form/browser/widgets.txt Removed some unused imports from the demo code (browser.py).

Derrick Hudson dman at dman13.dyndns.org
Mon Feb 21 21:33:41 EST 2005


Log message for revision 29238:
  Removed some unused imports from the demo code (browser.py).
  Updated the add menu registration -- the <browser:addForm>'s menu=
      attribute no longer applies; instead use <browser:addMenuItem>.
  

Changed:
  U   Zope3/trunk/src/zope/app/form/browser/widgets.txt

-=-
Modified: Zope3/trunk/src/zope/app/form/browser/widgets.txt
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/widgets.txt	2005-02-21 16:34:55 UTC (rev 29237)
+++ Zope3/trunk/src/zope/app/form/browser/widgets.txt	2005-02-22 02:33:41 UTC (rev 29238)
@@ -74,12 +74,6 @@
 we need to pass in additional information. This is given in the
 ``browser.py`` file::
 
-    from zope.app.container.interfaces import IAdding
-
-    from zope.app.event import publish
-    from zope.app.event.objectevent import ObjectModifiedEvent
-    from zope.app.event.objectevent import ObjectCreatedEvent
-
     from zope.app.form.browser.editview import EditView
     from zope.app.form.browser.add import AddView
     from zope.app.form import CustomWidgetFactory
@@ -176,11 +170,19 @@
         schema=".interfaces.IPoll"
         label="Add a Poll"
         content_factory=".poll.Poll"
-        name="zope.app.demo.poll"
+        name="AddPoll.html"
         class=".browser.PollAddView"
-        menu="add_content" title="Poll"
         permission="zope.ManageContent" />
 
+    <browser:addMenuItem
+        title="Poll Demo"
+        description="Poll Demo"
+        content_factory=".poll.Poll"
+        view="AddPoll.html"
+        permission="zope.ManageContent"
+        />
+
+
     <browser:editform
         schema=".interfaces.IPoll"
         class=".browser.PollEditView"



More information about the Zope3-Checkins mailing list