Second attempt at fixing unicode problem
authorMagnus Hagander <magnus@hagander.net>
Sun, 14 Oct 2018 17:33:38 +0000 (19:33 +0200)
committerMagnus Hagander <magnus@hagander.net>
Sun, 14 Oct 2018 17:33:38 +0000 (19:33 +0200)
The last one clearly wasn't enough...

postgresqleu/confwiki/views.py

index 46ca9e02a7df73827da6bf16f787dc723175c600..9ef32900ac2cc9f26fa78b01444fe6aa579d122f 100644 (file)
@@ -229,7 +229,7 @@ def admin_edit_page(request, urlname, pageid):
                                form.save_m2m()
                                s = StringIO()
                                for k,v in f.diff.items():
-                                       s.write(u"Changed {0} from {1} to {2}\n".format(k, v[0], v[1]))
+                                       s.write(u"Changed {0} from {1} to {2}\n".format(k, v[0], v[1]).encode('utf8'))
                                if s.tell() > 0:
                                        # Something changed, so generate audit email
                                        send_simple_mail(conference.contactaddr,