From c998feb3bb97cfd8f7ca00aeb6a0fa61f4815f07 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 14 Sep 2007 18:29:34 +0000 Subject: [PATCH] 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 --- django/core/management/commands/adminindex.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/core/management/commands/adminindex.py b/django/core/management/commands/adminindex.py index e3dd493fd3..4f389136ca 100644 --- a/django/core/management/commands/adminindex.py +++ b/django/core/management/commands/adminindex.py @@ -1,4 +1,5 @@ from django.core.management.base import AppCommand +from django.utils.encoding import force_unicode from django.utils.text import capfirst 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 % { 'app': app_label, '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(), 'changeperm': model._meta.get_change_permission(), })