Skip to content

Commit

Permalink
Use smart_text on verbose_name (thanks @aaugustin)
Browse files Browse the repository at this point in the history
  • Loading branch information
treyhunner committed Apr 15, 2014
1 parent 4680d1f commit 1e4e4bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion simple_history/models.py
Expand Up @@ -10,6 +10,10 @@
from django.conf import settings
from django.contrib import admin
from django.utils import importlib
try:
from django.utils.encoding import smart_text
except ImportError:
smart_text = unicode
try:
from django.utils.six import text_type
except ImportError:
Expand Down Expand Up @@ -182,7 +186,8 @@ def get_meta_options(self, model):
if self.user_set_verbose_name:
name = self.user_set_verbose_name
else:
name = string_concat('historical ', model._meta.verbose_name)
name = string_concat('historical ',
smart_text(model._meta.verbose_name))
meta_fields['verbose_name'] = name
return meta_fields

Expand Down

0 comments on commit 1e4e4bb

Please sign in to comment.