diff options
-rw-r--r-- | archaeological_files/templates/ishtar/sheet_file.html | 4 | ||||
-rw-r--r-- | ishtar_common/forms.py | 3 | ||||
-rw-r--r-- | ishtar_common/widgets.py | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index 7a6120e42..a5879b3ec 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -37,8 +37,8 @@ <p><label>{%trans "Edition date:"%}</label> <span class='value'>{% if item.history_date %}{{ item.history_date }}{% else %}{{ item.history.all.0.history_date }}{% endif %}</span></p> <!-- date = now --> -{% field "Reception date" item.reception_date %} -{% field "Creation date" item.creation_date %} +{% field "Reception date" item.reception_date|date:"DATE_FORMAT" %} +{% field "Creation date" item.creation_date|date:"DATE_FORMAT" %} {% field "Created by" item.history_creator.ishtaruser.full_label %} {% comment %} diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index 2e170fd1e..bf19dbc49 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -122,7 +122,8 @@ def get_now(): class ClosingDateFormSelection(forms.Form): form_label = _("Closing date") end_date = forms.DateField(label=_(u"Closing date"), - widget=widgets.JQueryDate) + widget=widgets.JQueryDate, + initial=datetime.date.today) def get_form_selection( diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 83fb23caf..89eead988 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -144,6 +144,8 @@ class JQueryDate(forms.TextInput): self.attrs['class'] = 'date-pickup' def render(self, name, value=None, attrs=None): + if value: + value = unicode(value) # very specific... if settings.COUNTRY == 'fr' and value and '/' in value: values = value.split('/') |