--- a/web/formfields.py Fri Feb 05 14:58:46 2010 +0100
+++ b/web/formfields.py Fri Feb 05 15:44:34 2010 +0100
@@ -13,13 +13,14 @@
from datetime import datetime
from logilab.mtconverter import xml_escape
+from logilab.common.date import ustrftime
from logilab.common.decorators import cached
from yams.schema import KNOWN_METAATTRIBUTES
from yams.constraints import (SizeConstraint, StaticVocabularyConstraint,
FormatConstraint)
-from cubicweb import Binary, tags, uilib, utils
+from cubicweb import Binary, tags, uilib
from cubicweb.web import INTERNAL_FIELD_VALUE, ProcessFormError, eid_param, \
formwidgets as fw
@@ -670,7 +671,7 @@
def format_single_value(self, req, value):
if value:
- return utils.ustrftime(value, req.property_value(self.format_prop))
+ return ustrftime(value, req.property_value(self.format_prop))
return u''
def render_example(self, req):
--- a/web/formwidgets.py Fri Feb 05 14:58:46 2010 +0100
+++ b/web/formwidgets.py Fri Feb 05 15:44:34 2010 +0100
@@ -12,8 +12,9 @@
from logilab.mtconverter import xml_escape
from logilab.common.deprecation import deprecated
+from logilab.common.date import todatetime
-from cubicweb import tags, uilib, utils
+from cubicweb import tags, uilib
from cubicweb.web import stdmsgs, INTERNAL_FIELD_VALUE, ProcessFormError
class FieldWidget(object):
@@ -508,7 +509,7 @@
timestr = req.form.get(field.input_name(form, 'time')).strip() or None
if datestr is None:
return None
- date = utils.todatetime(req.parse_datetime(datestr, 'Date'))
+ date = todatetime(req.parse_datetime(datestr, 'Date'))
if timestr is None:
return date
time = req.parse_datetime(timestr, 'Time')