[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/DTMLPage/Views/Browser - DTMLPageEdit.py:1.3
Martijn Faassen
m.faassen@vet.uu.nl
Wed, 4 Sep 2002 09:44:57 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Content/DTMLPage/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv31848/python/Zope/App/OFS/Content/DTMLPage/Views/Browser
Modified Files:
DTMLPageEdit.py
Log Message:
Refactored Forms (and Schema).
* A FormView now specifies a single schema explicitly as the 'schema'
(class) attribute. A schema is simply an interface with Field attributes
on it.
* The FormView code now uses the Schema package more for its own
implementation, instead of trying to reimplement things itself.
* got rid of the 'id' attribute for fields. Fields now already know what
name they have, because of the Interface package setting __name__.
Use getName() to get the field name.
=== Zope3/lib/python/Zope/App/OFS/Content/DTMLPage/Views/Browser/DTMLPageEdit.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/OFS/Content/DTMLPage/Views/Browser/DTMLPageEdit.py:1.2 Fri Jul 19 09:12:31 2002
+++ Zope3/lib/python/Zope/App/OFS/Content/DTMLPage/Views/Browser/DTMLPageEdit.py Wed Sep 4 09:44:25 2002
@@ -19,9 +19,11 @@
from Zope.App.Forms.Views.Browser import Widget
from Zope.App.Forms.Widget import CustomWidget
from Zope.App.Forms.Views.Browser.FormView import FormView
+from Zope.App.OFS.Content.DTMLPage.DTMLPage import IDTMLPage
class DTMLPageEdit(FormView):
form = ViewPageTemplateFile('edit.pt')
+ schema = IDTMLPage
custom_widgets = {'source': CustomWidget(Widget.TextAreaWidget,
cols=80, rows=15)}
fields_order = ('source',)