web_framework, tests: Workaround captcha 0.5.6 vs. Django 3.2

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa authored and James Valleroy committed 2021-09-18 08:36:46 -04:00
1 parent c5c1f5594d
commit 28c1d5eda3
2 files changed
+10

No files matched your search

+4
View File
@@ -22,6 +22,10 @@ logger = logging.getLogger(__name__)
def init(read_only=False):
"""Setup Django configuration in the absence of .settings file"""
# Workaround for django-simple-captcha 0.5.6 not being compatible with
# Django 3.2. 0.5.14 is almost there in Debian. Workaround only until then.
django.utils.encoding.python_2_unicode_compatible = lambda x: x
if cfg.secure_proxy_ssl_header:
settings.SECURE_PROXY_SSL_HEADER = (cfg.secure_proxy_ssl_header,
'https')