diff --git a/demo/demo/settings.py b/demo/demo/settings.py index 7d6399d..514a8fb 100644 --- a/demo/demo/settings.py +++ b/demo/demo/settings.py @@ -47,16 +47,18 @@ INSTALLED_APPS = ( 'rest_framework_swagger', ) -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) +# For backwards compatibility for Django 1.8 +MIDDLEWARE_CLASSES = MIDDLEWARE + ROOT_URLCONF = 'demo.urls' WSGI_APPLICATION = 'demo.wsgi.application' diff --git a/demo/demo/urls.py b/demo/demo/urls.py index e66bc9d..af7d38b 100644 --- a/demo/demo/urls.py +++ b/demo/demo/urls.py @@ -38,7 +38,7 @@ urlpatterns = [ url(r'^rest-auth/', include('rest_auth.urls')), url(r'^rest-auth/registration/', include('rest_auth.registration.urls')), url(r'^account/', include('allauth.urls')), - url(r'^admin/', include(admin.site.urls)), + url(r'^admin/', admin.site.urls), url(r'^accounts/profile/$', RedirectView.as_view(url='/', permanent=True), name='profile-redirect'), url(r'^docs/$', get_swagger_view(title='API Docs'), name='api_docs') ]