web/form.py
branchtls-sprint
changeset 899 48d465b5171a
parent 898 583f64567256
child 900 8f95ebbe2fd8
--- a/web/form.py	Fri Feb 20 15:57:29 2009 +0100
+++ b/web/form.py	Fri Feb 20 15:58:46 2009 +0100
@@ -514,14 +514,16 @@
         return formatstr % float(value)
 
 class DateField(StringField):
-    propname = 'ui.date-format'
+    format_prop = 'ui.date-format'
     
-    def format_value(self, req, value):
-        return value and ustrftime(value, req.property_value(self.propname)) or u''
+    def format_single_value(self, req, value):
+        return value and ustrftime(value, req.property_value(self.format_prop)) or u''
 
 class DateTimeField(DateField):
-    propname = 'ui.datetime-format'
+    format_prop = 'ui.datetime-format'
 
+class TimeField(DateField):
+    format_prop = 'ui.datetime-format'
     
 class FileField(StringField):
     needs_multipart = True