mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	unicode: Fixed a couple of places where IRI fragments are being used and need
to be converted correctly. git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5284 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -7,7 +7,7 @@ certain test -- e.g. being a DateField or ForeignKey. | |||||||
| """ | """ | ||||||
|  |  | ||||||
| from django.db import models | from django.db import models | ||||||
| from django.utils.encoding import smart_unicode | from django.utils.encoding import smart_unicode, iri_to_uri | ||||||
| from django.utils.translation import ugettext as _ | from django.utils.translation import ugettext as _ | ||||||
| import datetime | import datetime | ||||||
|  |  | ||||||
| @@ -44,7 +44,7 @@ class FilterSpec(object): | |||||||
|             for choice in self.choices(cl): |             for choice in self.choices(cl): | ||||||
|                 t.append(u'<li%s><a href="%s">%s</a></li>\n' % \ |                 t.append(u'<li%s><a href="%s">%s</a></li>\n' % \ | ||||||
|                     ((choice['selected'] and ' class="selected"' or ''), |                     ((choice['selected'] and ' class="selected"' or ''), | ||||||
|                      choice['query_string'] , |                      iri_to_uri(choice['query_string']), | ||||||
|                      choice['display'])) |                      choice['display'])) | ||||||
|             t.append('</ul>\n\n') |             t.append('</ul>\n\n') | ||||||
|         return "".join(t) |         return "".join(t) | ||||||
|   | |||||||
| @@ -3,6 +3,6 @@ | |||||||
| <ul> | <ul> | ||||||
| {% for choice in choices %} | {% for choice in choices %} | ||||||
|     <li{% if choice.selected %} class="selected"{% endif %}> |     <li{% if choice.selected %} class="selected"{% endif %}> | ||||||
|     <a href="{{ choice.query_string }}">{{ choice.display|escape }}</a></li> |     <a href="{{ choice.query_string|iriencode }}">{{ choice.display|escape }}</a></li> | ||||||
| {% endfor %} | {% endfor %} | ||||||
| </ul> | </ul> | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ | |||||||
|  |  | ||||||
| <ul class="objectlist"> | <ul class="objectlist"> | ||||||
| {% for object in object_list %} | {% for object in object_list %} | ||||||
| <li class="{% cycle odd,even %}"><a href="{{ object|urlencode }}/">{{ object|escape }}</a></li> | <li class="{% cycle odd,even %}"><a href="{{ object|iriencode }}/">{{ object|escape }}</a></li> | ||||||
| {% endfor %} | {% endfor %} | ||||||
| </ul> | </ul> | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user