Skip to content

Commit

Permalink
Force unicode app_title for JSON serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
sshwsfc committed Sep 21, 2016
1 parent c34dcea commit 114e044
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xadmin/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from django.conf import settings
from django.forms import Media
from django.utils.translation import get_language
from django.contrib.admin.utils import label_for_field,help_text_for_field
from django.contrib.admin.utils import label_for_field, help_text_for_field
import datetime
import decimal

Expand Down
4 changes: 2 additions & 2 deletions xadmin/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from django.template import Context, Template
from django.template.response import TemplateResponse
from django.utils.decorators import method_decorator, classonlymethod
from django.utils.encoding import smart_unicode
from django.utils.encoding import force_unicode, smart_unicode, smart_str
from django.utils.http import urlencode
from django.utils.itercompat import is_iterable
from django.utils.safestring import mark_safe
Expand Down Expand Up @@ -362,7 +362,7 @@ def get_url(menu, had_urls):
if app_label.lower() in self.apps_label_title:
app_title = self.apps_label_title[app_label.lower()]
else:
app_title = apps.get_app_config(app_label).verbose_name
app_title = unicode(apps.get_app_config(app_label).verbose_name)
#find app icon
if app_label.lower() in self.apps_icons:
app_icon = self.apps_icons[app_label.lower()]
Expand Down

0 comments on commit 114e044

Please sign in to comment.