Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #12443 - Don't use thousand separators on year numbers.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12060 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f45ac2ff1872ca49295fb27c4e99fcb4c25d0af0 1 parent 2c32902
Jannis Leidel jezdez authored
4 django/contrib/admin/templatetags/admin_list.py
View
@@ -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)
2  django/contrib/databrowse/plugins/calendars.py
View
@@ -37,7 +37,7 @@ def urls(self, plugin_name, easy_instance_field):
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))]
2  django/contrib/databrowse/templates/databrowse/calendar_day.html
View
@@ -4,7 +4,7 @@
{% block content %}
-<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../../../../">Calendars</a> / <a href="../../../">By {{ field.verbose_name }}</a> / <a href="../../">{{ day.year }}</a> / <a href="../">{{ day|date:"F" }}</a> / {{ day.day }}</div>
+<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../../../../">Calendars</a> / <a href="../../../">By {{ field.verbose_name }}</a> / <a href="../../">{{ day|date:"Y" }}</a> / <a href="../">{{ day|date:"F" }}</a> / {{ day|date:"d" }}</div>
<h1>{{ 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" }}</h1>
2  django/contrib/databrowse/templates/databrowse/calendar_main.html
View
@@ -10,7 +10,7 @@
<ul class="objectlist">
{% for year in date_list %}
-<li class="{% cycle 'odd' 'even' %}"><a href="{{ year.year }}/">{{ year.year }}</a></li>
+<li class="{% cycle 'odd' 'even' %}"><a href="{{ year|date:"Y" }}/">{{ year|date:"Y" }}</a></li>
{% endfor %}
</ul>
2  django/contrib/databrowse/templates/databrowse/calendar_month.html
View
@@ -4,7 +4,7 @@
{% block content %}
-<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../../../">Calendars</a> / <a href="../../">By {{ field.verbose_name }}</a> / <a href="../">{{ month.year }}</a> / {{ month|date:"F" }}</div>
+<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../../../">Calendars</a> / <a href="../../">By {{ field.verbose_name }}</a> / <a href="../">{{ month|date:"Y" }}</a> / {{ month|date:"F" }}</div>
<h1>{{ 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" }}</h1>
Please sign in to comment.
Something went wrong with that request. Please try again.