[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Formulator/Widgets/Browser - DateTimeWidget.py:1.1.4.2
Jim Fulton
jim@zope.com
Thu, 23 May 2002 14:01:40 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/Formulator/Widgets/Browser
In directory cvs.zope.org:/tmp/cvs-serv26429/lib/python/Zope/App/Formulator/Widgets/Browser
Modified Files:
Tag: Zope-3x-branch
DateTimeWidget.py
Log Message:
This all started with wanting to be able to use url;view in a ZPT path. :)
That lead me to:
- Massive traversal refactoring.
Namespace handling is now centralized in Zope.App.Traversing.
- ZPT refactoring, including some renaming that touches pretty much everything. :)
- The application specific ZPT support was moved into
Zope.App.PageTemplate.
- To get page template files (for use in views):
from Zope.App.PageTemplate import ViewPageTemplateFile
- Fixed up security so that ZPT expressions only have access to
safe builtins and so that modules namespace does imports safely.
- Got ZPTPage working!
- renaming url to absolute_url and got absolute_url to work in paths.
- Cleaned up the (as yet unused) RestrictedInterpreter module in
Zope.Security. In particular, changed to use a separate
RestrictedBuiltins module.
=== Zope3/lib/python/Zope/App/Formulator/Widgets/Browser/DateTimeWidget.py 1.1.4.1 => 1.1.4.2 ===
#
##############################################################################
-"""
-
-$Id$
-"""
-
-from Zope.PageTemplate.PageTemplateFile import PageTemplateFile
-from Widget import Widget
-from DateTime import DateTime
-
-
-class DateTimeWidget(CompositeWidget):
-
-
- __implements__ = CompositeWidget.__implements__
-
-
- propertyNames = Widget.property_names +\
- ['dateSeparator', 'timeSeparator',
- 'inputStyle', 'inputOrder', 'dateOnly']
-
- template = PageTemplateFile('datetime.pt')
-
- widgets = {'year': IntegerWidget(start=0, end=6000),
- 'month': IntegerWidget(start=0, end=12),
- 'day': IntegerWidget(start=0, end=31),
- 'hour': IntegerWidget(start=0, end=23),
- 'minute': IntegerWidget(start=0, end=59)}
-
- default = None
- defaultNow = 0
- dateSeparator = '/'
- timeSeparator = ':'
- inputStyle = "text"
- inputOrder = ('year', 'month', 'day')
- dateOnly = 0
+"""
+
+$Id$
+"""
+
+from Zope.App.PageTemplate import ViewPageTemplateFile
+from Widget import Widget
+from DateTime import DateTime
+
+
+class DateTimeWidget(CompositeWidget):
+
+
+ __implements__ = CompositeWidget.__implements__
+
+
+ propertyNames = Widget.property_names +\
+ ['dateSeparator', 'timeSeparator',
+ 'inputStyle', 'inputOrder', 'dateOnly']
+
+ template = ViewPageTemplateFile('datetime.pt')
+
+ widgets = {'year': IntegerWidget(start=0, end=6000),
+ 'month': IntegerWidget(start=0, end=12),
+ 'day': IntegerWidget(start=0, end=31),
+ 'hour': IntegerWidget(start=0, end=23),
+ 'minute': IntegerWidget(start=0, end=59)}
+
+ default = None
+ defaultNow = 0
+ dateSeparator = '/'
+ timeSeparator = ':'
+ inputStyle = "text"
+ inputOrder = ('year', 'month', 'day')
+ dateOnly = 0