Fixed #5286 -- Fixed non-HTML output bug in adminindex command. Thanks, dan.fairs@gmail.com and piranha

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-09-14 18:29:34 +00:00
parent a6b1d65e33
commit c998feb3bb
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
from django.core.management.base import AppCommand from django.core.management.base import AppCommand
from django.utils.encoding import force_unicode
from django.utils.text import capfirst from django.utils.text import capfirst
MODULE_TEMPLATE = ''' {%% if perms.%(app)s.%(addperm)s or perms.%(app)s.%(changeperm)s %%} MODULE_TEMPLATE = ''' {%% if perms.%(app)s.%(addperm)s or perms.%(app)s.%(changeperm)s %%}
@ -24,7 +25,7 @@ class Command(AppCommand):
output.append(MODULE_TEMPLATE % { output.append(MODULE_TEMPLATE % {
'app': app_label, 'app': app_label,
'mod': model._meta.module_name, 'mod': model._meta.module_name,
'name': capfirst(model._meta.verbose_name_plural), 'name': force_unicode(capfirst(model._meta.verbose_name_plural)),
'addperm': model._meta.get_add_permission(), 'addperm': model._meta.get_add_permission(),
'changeperm': model._meta.get_change_permission(), 'changeperm': model._meta.get_change_permission(),
}) })