← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands-website/settings_unicode into lp:widelands-website

 

kaputtnik has proposed merging lp:~widelands-dev/widelands-website/settings_unicode into lp:widelands-website.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/settings_unicode/+merge/332381

Let python read local_settings.py as utf-8.
Treat all strings in this file as unicode.

This is needed to get asian characters work for the spam filter. 
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/settings_unicode into lp:widelands-website.
=== modified file 'local_settings.py.sample'
--- local_settings.py.sample	2017-04-05 18:05:24 +0000
+++ local_settings.py.sample	2017-10-17 20:04:00 +0000
@@ -1,3 +1,10 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# The above leads python2.7 let read this file as utf-8
+# Needs to be directly after the python shebang
+
+# Treat all strings as unicode
+from __future__ import unicode_literals
 import os
 import re
 


Follow ups