mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-23 11:56:36 +11:00
Fix Django 3.0 tests with CSP issues
This commit is contained in:
parent
6d8c0fd78e
commit
e3d4725e52
2 changed files with 7 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -4,5 +4,5 @@ docs/_build
|
|||
dpaste/settings/local.py
|
||||
dpaste/static/
|
||||
dpaste.egg-info
|
||||
dpaste.db
|
||||
dpaste.sqlite
|
||||
node_modules
|
||||
|
|
|
@ -8,3 +8,9 @@ SECRET_KEY = "test-key"
|
|||
DATABASES = {
|
||||
"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}
|
||||
}
|
||||
|
||||
# Drop CSP middleware for Django 3.0 until it was fixed upstream
|
||||
# https://github.com/mozilla/django-csp/issues/129
|
||||
import django
|
||||
if django.get_version().startswith("3."):
|
||||
MIDDLEWARE.remove("csp.middleware.CSPMiddleware")
|
||||
|
|
Loading…
Reference in a new issue