mirror of https://github.com/django/django.git
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
This commit is contained in:
parent
2c329024ca
commit
f45ac2ff18
|
@ -247,8 +247,8 @@ def date_hierarchy(cl):
|
||||||
return {
|
return {
|
||||||
'show': True,
|
'show': True,
|
||||||
'choices': [{
|
'choices': [{
|
||||||
'link': link({year_field: year.year}),
|
'link': link({year_field: str(year.year)}),
|
||||||
'title': year.year
|
'title': str(year.year),
|
||||||
} for year in years]
|
} for year in years]
|
||||||
}
|
}
|
||||||
date_hierarchy = register.inclusion_tag('admin/date_hierarchy.html')(date_hierarchy)
|
date_hierarchy = register.inclusion_tag('admin/date_hierarchy.html')(date_hierarchy)
|
||||||
|
|
|
@ -37,7 +37,7 @@ class CalendarPlugin(DatabrowsePlugin):
|
||||||
return [mark_safe(u'%s%s/%s/%s/%s/%s/' % (
|
return [mark_safe(u'%s%s/%s/%s/%s/%s/' % (
|
||||||
easy_instance_field.model.url(),
|
easy_instance_field.model.url(),
|
||||||
plugin_name, easy_instance_field.field.name,
|
plugin_name, easy_instance_field.field.name,
|
||||||
d.year,
|
str(d.year),
|
||||||
datetime_safe.new_date(d).strftime('%b').lower(),
|
datetime_safe.new_date(d).strftime('%b').lower(),
|
||||||
d.day))]
|
d.day))]
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
{% block content %}
|
{% 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>
|
<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>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<ul class="objectlist">
|
<ul class="objectlist">
|
||||||
{% for year in date_list %}
|
{% 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 %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
{% block content %}
|
{% 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>
|
<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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue