rename propname into format_prop tls-sprint
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 20 Feb 2009 15:58:46 +0100
branchtls-sprint
changeset 899 48d465b5171a
parent 898 583f64567256
child 900 8f95ebbe2fd8
rename propname into format_prop
web/form.py
--- 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