diff -r dd83bd03fecd -r b7e3f3b2d150 web/ldt/forms/widgets.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/ldt/forms/widgets.py Thu Sep 09 16:47:51 2010 +0200 @@ -0,0 +1,17 @@ +""" +Some useful form widgets +""" + +from django.contrib.admin.widgets import AdminSplitDateTime +from django.utils.safestring import mark_safe +from django.utils.translation import ugettext as _ + + +class LdtSplitDateTime(AdminSplitDateTime): + """ + A widget that extend the AdminSplitDateTime to improve the html outputted + """ + + def format_output(self, rendered_widgets): + return mark_safe(u'
%s
%s
%s
%s
' % \ + (_('Date'), rendered_widgets[0], _('Time'), rendered_widgets[1]))