diff --git a/README.rst b/README.rst index 08db45a..042e991 100644 --- a/README.rst +++ b/README.rst @@ -47,8 +47,8 @@ INSTALLED_APPS += [ 'aldryn_redirects' ] -# add the middleware somewhere near the top of MIDDLEWARE_CLASSES +# add the middleware somewhere near the top of MIDDLEWARE -MIDDLEWARE_CLASSES.insert( +MIDDLEWARE.insert( 0, 'aldryn_redirects.middleware.RedirectFallbackMiddleware') ``` diff --git a/aldryn_config.py b/aldryn_config.py index 0a1eabc..d6f6ca1 100644 --- a/aldryn_config.py +++ b/aldryn_config.py @@ -4,5 +4,5 @@ class Form(forms.BaseForm): def to_settings(self, data, settings): # No need to setup django-parler. That is already done in aldryn-django-cms - settings['MIDDLEWARE_CLASSES'].insert(0, 'aldryn_redirects.middleware.RedirectFallbackMiddleware') + settings['MIDDLEWARE'].insert(0, 'aldryn_redirects.middleware.RedirectFallbackMiddleware') return settings diff --git a/aldryn_redirects/admin.py b/aldryn_redirects/admin.py index f4ab150..55320b9 100644 --- a/aldryn_redirects/admin.py +++ b/aldryn_redirects/admin.py @@ -4,7 +4,7 @@ from django.conf import settings from django.contrib import admin, messages -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import HttpResponse from django.shortcuts import redirect, render from django.utils import timezone diff --git a/aldryn_redirects/models.py b/aldryn_redirects/models.py index 5ac35b2..e4101c5 100644 --- a/aldryn_redirects/models.py +++ b/aldryn_redirects/models.py @@ -2,7 +2,7 @@ from django.db import models from django.contrib.sites.models import Site -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _, ugettext diff --git a/tests/settings.py b/tests/settings.py index 9a0fa81..e0bbaf1 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals, print_function, division HELPER_SETTINGS = { - 'MIDDLEWARE_CLASSES': [ + 'MIDDLEWARE': [ 'aldryn_redirects.middleware.RedirectFallbackMiddleware', ], 'INSTALLED_APPS': [