# HG changeset patch # User Sylvain Thénault # Date 1244628537 -7200 # Node ID be76ce00a05eacc6c7a594eb7569a3c57bd8ae8d # Parent 9e279029d7a08bba16f20a4477b8f38a2dca5db9 fix TimeField format_prop, use format_single_value directly in render_example diff -r 9e279029d7a0 -r be76ce00a05e web/formfields.py --- a/web/formfields.py Wed Jun 10 12:08:26 2009 +0200 +++ b/web/formfields.py Wed Jun 10 12:08:57 2009 +0200 @@ -376,7 +376,7 @@ return formatstr % float(value) def render_example(self, req): - return self.format_value(req, 1.234) + return self.format_single_value(req, 1.234) class DateField(StringField): @@ -387,7 +387,7 @@ return value and ustrftime(value, req.property_value(self.format_prop)) or u'' def render_example(self, req): - return self.format_value(req, datetime.now()) + return self.format_single_value(req, datetime.now()) class DateTimeField(DateField): @@ -395,7 +395,7 @@ class TimeField(DateField): - format_prop = 'ui.datetime-format' + format_prop = 'ui.time-format' widget = TextInput