Add bootstrap and test. Py3.4 by default, move to django_cas_ng and fnpdeploy.
[fnp-django-template.git] / src / src / project_name / settings / middleware.py
index 80ffc44..7f6ba73 100644 (file)
@@ -1,25 +1,15 @@
-from . import INSTALLED_APPS
 
-
-MIDDLEWARE_CLASSES = tuple(x for x in (
-    'django.contrib.sessions.middleware.SessionMiddleware'
-            if "django.contrib.sessions" in INSTALLED_APPS else None,
+MIDDLEWARE_CLASSES = [
+    'django.contrib.sessions.middleware.SessionMiddleware',
     #'django.middleware.locale.LocaleMiddleware',
     'fnpdjango.middleware.URLLocaleMiddleware',
 
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
-    'django.contrib.auth.middleware.AuthenticationMiddleware'
-            if "django.contrib.auth" in INSTALLED_APPS else None,
-    'django_cas.middleware.CASMiddleware'
-            if "django_cas" in INSTALLED_APPS else None,
-    'django.contrib.messages.middleware.MessageMiddleware'
-            if "django.contrib.messages" in INSTALLED_APPS else None,
-    'piwik.django.middleware.PiwikMiddleware'
-            if "piwik.django" in INSTALLED_APPS else None,
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django_cas_ng.middleware.CASMiddleware', # Remove if not using CAS.
+    'django.contrib.messages.middleware.MessageMiddleware',
     # Uncomment the next line for simple clickjacking protection:
     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
-    'pagination.middleware.PaginationMiddleware'
-            if "pagination" in INSTALLED_APPS else None,
     'fnpdjango.middleware.SetRemoteAddrFromXRealIP'
-) if x is not None)
+]