Update config for modern django versions
authorMagnus Hagander <magnus@hagander.net>
Tue, 31 Mar 2020 18:09:38 +0000 (20:09 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 31 Mar 2020 18:09:38 +0000 (20:09 +0200)
MIDDLEWARE_CLASSES should now be named MIDDLEWARE, the messages app is
now required by admin (was before as well but not enforced) and the
include syntax for the admin site has changed.

gitadmin/gitadmin/settings.py
gitadmin/gitadmin/urls.py

index da717aa2b959ffecd677e9acc29dd659148d127f..93a22b7b962ec3fff146654222a39160145897be 100644 (file)
@@ -51,7 +51,7 @@ STATIC_URL = '/media/'
 # Make this unique, and don't share it with anybody.
 SECRET_KEY = '#!n9!a8@q)6y^yq&$6zij_=#g*o52ogc=1uch)d0!hb%-5&w!_'
 
-MIDDLEWARE_CLASSES = (
+MIDDLEWARE = (
     'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
@@ -79,6 +79,7 @@ INSTALLED_APPS = (
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
+    'django.contrib.messages',
     'gitadmin.adm',
     'django.contrib.admin',
 )
index 761a55fb31399d1205ce96863fd6eea9485f5335..d3da655f98de73deb2418b7e5aae5f4ec661ea87 100644 (file)
@@ -14,7 +14,7 @@ feeds = {
 
 urlpatterns = [
     # Uncomment the next line to enable the admin:
-    url(r'^adm/admin/', include(admin.site.urls)),
+    url(r'^adm/admin/', admin.site.urls),
 
     # Feeds
     url(r'^feeds/all/$', AllReposFeed()),