aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rpki/gui/script_util.py8
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 = (),