X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/5c27752e396ef1b6e794a489b577b0f7be3126b6..63ad88e2826d82b4ea7ff380784d471fa4884e3d:/forum/settings/base.py?ds=sidebyside diff --git a/forum/settings/base.py b/forum/settings/base.py index 7436f46..cc706bc 100644 --- a/forum/settings/base.py +++ b/forum/settings/base.py @@ -1,5 +1,5 @@ import django.dispatch -from django.utils.encoding import force_unicode +from django.utils.encoding import force_unicode, smart_unicode from datetime import datetime, timedelta import logging @@ -42,7 +42,7 @@ class BaseSetting(object): return str(self.value) def __unicode__(self): - return unicode(self.value) + return smart_unicode(self.value) @property def value(self): @@ -79,7 +79,7 @@ class BaseSetting(object): except KeyValue.DoesNotExist: kv = KeyValue(key=self.name) except Exception, e: - logging.error("Error savin setting to database (%s): %s" % (self.name, str(e))) + logging.error("Error saving setting to database (%s): %s" % (self.name, str(e))) return kv.value = value @@ -124,5 +124,3 @@ class Setting(object): Setting.emulators[deftype] = emul return emul(name, default, set, field_context) - -