1 MIDDLEWARE_CLASSES = tuple(x for x in (
2 'django.middleware.cache.UpdateCacheMiddleware',
3 'django.contrib.sessions.middleware.SessionMiddleware'
4 if "django.contrib.sessions" in INSTALLED_APPS else None,
5 #'django.middleware.locale.LocaleMiddleware',
6 'fnpdjango.middleware.URLLocaleMiddleware',
8 'django.middleware.common.CommonMiddleware',
9 'django.middleware.csrf.CsrfViewMiddleware',
10 'honeypot.middleware.HoneypotMiddleware',
11 'django.contrib.auth.middleware.AuthenticationMiddleware'
12 if "django.contrib.auth" in INSTALLED_APPS else None,
13 'django_cas.middleware.CASMiddleware'
14 if "django_cas" in INSTALLED_APPS else None,
15 'django.contrib.messages.middleware.MessageMiddleware'
16 if "django.contrib.messages" in INSTALLED_APPS else None,
17 'piwik.django.middleware.PiwikMiddleware'
18 if "piwik.django" in INSTALLED_APPS else None,
19 # Uncomment the next line for simple clickjacking protection:
20 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
21 'pagination.middleware.PaginationMiddleware'
22 if "pagination" in INSTALLED_APPS else None,
23 'django.middleware.cache.FetchFromCacheMiddleware',
24 'fnpdjango.middleware.SetRemoteAddrFromXRealIP'