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

Proposed by kaputtnik
Status: Merged
Merged at revision: 473
Proposed branch: lp:~widelands-dev/widelands-website/settings_unicode
Merge into: lp:widelands-website
Diff against target: 13 lines (+7/-0)
1 file modified
local_settings.py.sample (+7/-0)
To merge this branch: bzr merge lp:~widelands-dev/widelands-website/settings_unicode
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+332381@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
474. By kaputtnik

spelling

Revision history for this message
kaputtnik (franku) wrote :

Tested on alpha. Works fine there :-)

Revision history for this message
SirVer (sirver) wrote :

Lgtm. Let’s ship it!

> Am 17.10.2017 um 22:04 schrieb kaputtnik <email address hidden>:
>
> 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.
> --
> You are subscribed to branch 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

Revision history for this message
kaputtnik (franku) wrote :

Thanks :-)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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:07:33 +0000
@@ -1,3 +1,10 @@
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3# The above leads python2.7 to read this file as utf-8
4# Needs to be directly after the python shebang
5
6# Treat all strings as unicode
7from __future__ import unicode_literals
1import os8import os
2import re9import re
310

Subscribers

People subscribed via source and target branches