diff options
author | Rob Austein <sra@hactrn.net> | 2015-11-24 23:14:42 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2015-11-24 23:14:42 +0000 |
commit | d75c7fdb5045ed2cf64c8db4bd010bd64316d348 (patch) | |
tree | c171416a564ba9bd45d5a104037f4c515b9dbba5 /rpki | |
parent | 7448eef3cf7c10ce2a3293907b0fa3739c26310d (diff) |
Yet another private Django config that needed to be kludged to charset
latin1 to work around MySQL 5.6 insanity. Fixes #782 (again).
svn path=/trunk/; revision=6193
Diffstat (limited to 'rpki')
-rw-r--r-- | rpki/gui/script_util.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rpki/gui/script_util.py b/rpki/gui/script_util.py index 43a53bc6..c8248527 100644 --- a/rpki/gui/script_util.py +++ b/rpki/gui/script_util.py @@ -33,6 +33,11 @@ def setup(): cfg = config.parser(section='web_portal') # INSTALLED_APPS doesn't seem necessary so long as you are only accessing # existing tables. + # + # Setting charset to latin1 is a disgusting kludge, but without + # this MySQL 5.6 (and, proably, later) gets tetchy about ASN.1 DER + # stored in BLOB columns not being well-formed UTF8 (sic). If you + # know of a better solution, tell us. settings.configure( DATABASES={ 'default': { @@ -40,6 +45,9 @@ def setup(): 'NAME': cfg.get('sql-database'), 'USER': cfg.get('sql-username'), 'PASSWORD': cfg.get('sql-password'), + 'OPTIONS': { + 'charset': 'latin1', + } } }, MIDDLEWARE_CLASSES = (), |