﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21342	Localized pk value in admin panel template	olevinskyvs	nobody	"Problem templates is:

{{{
django/contrib/admin/templates/admin/object_history.html
django/contrib/admin/templates/admin/delete_confirmation.html
}}}


line in “breadcrumbs” block:

{{{
&rsaquo; <a href=""{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}"">{{ object|truncatewords:""18"" }}</a>
}}}


My locale settings:

{{{
TIME_ZONE = 'Europe/Moscow'
LANGUAGE_CODE = 'ru-ru'
USE_I18N = True
USE_L10N = True
USE_TZ = False
}}}


When object.pk value is big, for example 123456, output looks like “123 456” and i got broken link: http://example.com/admin/auth/user/123%C2%A0456/.

I prefer to use “unlocalize” filter for prevent this issue.

Pull requests on GitHub:
https://github.com/django/django/pull/1810
https://github.com/django/django/pull/1811
"	Bug	closed	contrib.admin	dev	Normal	needsinfo			Unreviewed	0	0	0	0	0	0
