Skip to content

Commit

Permalink
Fix XViewMiddleware name in Django <1.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmachine committed Nov 13, 2020
1 parent e8f4359 commit cad3b5b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions ixc_django_docker/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,15 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

if django.VERSION < (1, 10):
if django.VERSION >= (1, 8):
MIDDLEWARE += ('django.contrib.admindocs.middleware.XViewMiddleware', )
else:
MIDDLEWARE += ('django.middleware.doc.XViewMiddleware', )

if django.VERSION >= (1, 7):
MIDDLEWARE += (
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
)
if (1, 7) <= django.VERSION < (1, 10):
MIDDLEWARE += (
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
)

ROOT_URLCONF = 'ixc_django_docker.urls'

Expand Down

0 comments on commit cad3b5b

Please sign in to comment.