Ticket #5715: admin_iriencode.diff
File admin_iriencode.diff, 3.4 KB (added by , 17 years ago) |
---|
-
django/contrib/admin/templatetags/admin_list.py
7 7 from django.utils.html import escape 8 8 from django.utils.text import capfirst 9 9 from django.utils.translation import get_date_formats, get_partial_date_formats, ugettext as _ 10 from django.utils.encoding import smart_unicode, smart_str, force_unicode 10 from django.utils.encoding import smart_unicode, smart_str, force_unicode, iri_to_uri 11 11 from django.template import Library 12 12 import datetime 13 13 … … 21 21 elif i == cl.page_num: 22 22 return u'<span class="this-page">%d</span> ' % (i+1) 23 23 else: 24 return u'<a href="%s"%s>%d</a> ' % (cl.get_query_string({PAGE_VAR: i}), (i == cl.paginator.pages-1 and ' class="end"' or ''), i+1) 24 return u'<a href="%s"%s>%d</a> ' % ( 25 iri_to_uri(cl.get_query_string({PAGE_VAR: i})), 26 (i == cl.paginator.pages-1 and ' class="end"' or ''), i+1) 25 27 paginator_number = register.simple_tag(paginator_number) 26 28 27 29 def pagination(cl): -
django/contrib/admin/templates/admin/pagination.html
7 7 {% endfor %} 8 8 {% endif %} 9 9 {{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name|escape }}{% else %}{{ cl.opts.verbose_name_plural|escape }}{% endifequal %} 10 {% if show_all_url %} <a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %}10 {% if show_all_url %} <a href="{{ show_all_url|iriencode }}" class="showall">{% trans 'Show all' %}</a>{% endif %} 11 11 </p> -
django/contrib/admin/templates/admin/change_list_results.html
3 3 <thead> 4 4 <tr> 5 5 {% for header in result_headers %}<th{{ header.class_attrib }}> 6 {% if header.sortable %}<a href="{{ header.url }}">{% endif %}6 {% if header.sortable %}<a href="{{ header.url|iriencode }}">{% endif %} 7 7 {{ header.text|capfirst }} 8 8 {% if header.sortable %}</a>{% endif %}</th>{% endfor %} 9 9 </tr> -
django/contrib/admin/templates/admin/date_hierarchy.html
1 1 {% if show %} 2 2 <div class="xfull"> 3 3 <ul class="toplinks"> 4 {% if back %}<li class="date-back"><a href="{{ back.link }}">‹ {{ back.title|escape }}</a></li>{% endif %}4 {% if back %}<li class="date-back"><a href="{{ back.link|iriencode }}">‹ {{ back.title|escape }}</a></li>{% endif %} 5 5 {% for choice in choices %} 6 <li> {% if choice.link %}<a href="{{ choice.link }}">{% endif %}{{ choice.title|escape }}{% if choice.link %}</a>{% endif %}</li>6 <li> {% if choice.link %}<a href="{{ choice.link|iriencode }}">{% endif %}{{ choice.title|escape }}{% if choice.link %}</a>{% endif %}</li> 7 7 {% endfor %} 8 8 </ul><br class="clear" /> 9 9 </div>