Fix get_here_url on 404.
[prawokultury.git] / prawokultury / settings.d / 40-middleware.conf
index 72f7e14..530e34a 100755 (executable)
@@ -1,12 +1,23 @@
 MIDDLEWARE_CLASSES = (
     'django.contrib.sessions.middleware.SessionMiddleware',
     #'django.middleware.locale.LocaleMiddleware',
-    'migdal.middleware.URLLocaleMiddleware',
+    'fnpdjango.middleware.URLLocaleMiddleware',
 
     'django.middleware.common.CommonMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
+)
+
+if 'django_cas' in INSTALLED_APPS:
+    MIDDLEWARE_CLASSES += (
+        'django_cas.middleware.CASMiddleware',
+    )
+
+MIDDLEWARE_CLASSES += (
     'django.contrib.messages.middleware.MessageMiddleware',
+    'piwik.django.middleware.PiwikMiddleware',
     # Uncomment the next line for simple clickjacking protection:
     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+    'pagination.middleware.PaginationMiddleware',
+    'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
 )