diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py index 352277351e..8626ef0c23 100644 --- a/django/contrib/admin/templatetags/admin_list.py +++ b/django/contrib/admin/templatetags/admin_list.py @@ -247,8 +247,8 @@ def date_hierarchy(cl): return { 'show': True, 'choices': [{ - 'link': link({year_field: year.year}), - 'title': year.year + 'link': link({year_field: str(year.year)}), + 'title': str(year.year), } for year in years] } date_hierarchy = register.inclusion_tag('admin/date_hierarchy.html')(date_hierarchy) diff --git a/django/contrib/databrowse/plugins/calendars.py b/django/contrib/databrowse/plugins/calendars.py index ac2f522148..9bbd02da26 100644 --- a/django/contrib/databrowse/plugins/calendars.py +++ b/django/contrib/databrowse/plugins/calendars.py @@ -37,7 +37,7 @@ class CalendarPlugin(DatabrowsePlugin): return [mark_safe(u'%s%s/%s/%s/%s/%s/' % ( easy_instance_field.model.url(), plugin_name, easy_instance_field.field.name, - d.year, + str(d.year), datetime_safe.new_date(d).strftime('%b').lower(), d.day))] diff --git a/django/contrib/databrowse/templates/databrowse/calendar_day.html b/django/contrib/databrowse/templates/databrowse/calendar_day.html index b0a221d5d3..c009a94c66 100644 --- a/django/contrib/databrowse/templates/databrowse/calendar_day.html +++ b/django/contrib/databrowse/templates/databrowse/calendar_day.html @@ -4,7 +4,7 @@ {% block content %} - +

{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural }}{% else %}{{ model.verbose_name }}{% endif %} with {{ field.verbose_name }} on {{ day|date:"F j, Y" }}

diff --git a/django/contrib/databrowse/templates/databrowse/calendar_main.html b/django/contrib/databrowse/templates/databrowse/calendar_main.html index b22a44d321..7cb59042df 100644 --- a/django/contrib/databrowse/templates/databrowse/calendar_main.html +++ b/django/contrib/databrowse/templates/databrowse/calendar_main.html @@ -10,7 +10,7 @@ diff --git a/django/contrib/databrowse/templates/databrowse/calendar_month.html b/django/contrib/databrowse/templates/databrowse/calendar_month.html index 8a417f4c93..ad189f441c 100644 --- a/django/contrib/databrowse/templates/databrowse/calendar_month.html +++ b/django/contrib/databrowse/templates/databrowse/calendar_month.html @@ -4,7 +4,7 @@ {% block content %} - +

{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural }}{% else %}{{ model.verbose_name }}{% endif %} with {{ field.verbose_name }} on {{ month|date:"F Y" }}