Files
edx-platform/lms/envs/load_test.py
Ayub-khan d3a02bc3e5 BOM-1121
-Updated middleware setting to use use middleware insted of
middleware_classes
-github install of django-method-override fork to support
new style middleware in django1.11
2020-02-11 14:35:26 +05:00

23 lines
648 B
Python

"""
Settings for load testing.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from six.moves import filter
from .production import *
# Disable CSRF for load testing
EXCLUDE_CSRF = lambda elem: elem not in [
'django.template.context_processors.csrf',
'django.middleware.csrf.CsrfViewMiddleware'
]
DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors'] = list(filter(
EXCLUDE_CSRF, DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors']
))
MIDDLEWARE = list(filter(EXCLUDE_CSRF, MIDDLEWARE))