X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/5c27752e396ef1b6e794a489b577b0f7be3126b6..2c3ba81e19fd6d84ab208ad90a48fd81e4780c29:/forum/settings/base.py?ds=inline 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) - -