From: Jan Szejko Date: Wed, 27 Sep 2017 09:40:14 +0000 (+0200) Subject: fix contact admin? X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/a7d2c58f1476916c7781866ea55abeba9a12a18a?hp=7adb123aef4539364d30452099423ec54a60ae01 fix contact admin? --- diff --git a/contact/models.py b/contact/models.py index 5f031c2..e7a2c4a 100644 --- a/contact/models.py +++ b/contact/models.py @@ -19,6 +19,7 @@ class Contact(models.Model): import yaml value = yaml.safe_dump(value, allow_unicode=True, default_flow_style=False) if for_html: + from django.utils.encoding import smart_unicode value = smart_unicode(value).replace(u" ", unichr(160)) return value