mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
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:
parent
c5c1f5594d
commit
28c1d5eda3
@ -5,6 +5,12 @@ Django settings for test modules.
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
import django.utils.encoding
|
||||||
|
|
||||||
|
django.utils.encoding.python_2_unicode_compatible = lambda x: x
|
||||||
|
|
||||||
TEST_DATA_DIR = os.path.dirname(os.path.abspath(__file__))
|
TEST_DATA_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
AXES_ENABLED = False
|
AXES_ENABLED = False
|
||||||
|
|||||||
@ -22,6 +22,10 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
def init(read_only=False):
|
def init(read_only=False):
|
||||||
"""Setup Django configuration in the absence of .settings file"""
|
"""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:
|
if cfg.secure_proxy_ssl_header:
|
||||||
settings.SECURE_PROXY_SSL_HEADER = (cfg.secure_proxy_ssl_header,
|
settings.SECURE_PROXY_SSL_HEADER = (cfg.secure_proxy_ssl_header,
|
||||||
'https')
|
'https')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user