Merge remote-tracking branch 'origin/filmowa' into filmowa
[edumed.git] / edumed / settings.d / 40-middleware.py
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     'subdomains.middleware.SubdomainURLRoutingMiddleware',
7     'fnpdjango.middleware.URLLocaleMiddleware',
8
9     'django.middleware.common.CommonMiddleware',
10     'django.middleware.csrf.CsrfViewMiddleware',
11     'honeypot.middleware.HoneypotMiddleware',
12     'django.contrib.auth.middleware.AuthenticationMiddleware'
13             if "django.contrib.auth" in INSTALLED_APPS else None,
14     'django_cas.middleware.CASMiddleware'
15             if "django_cas" in INSTALLED_APPS else None,
16     'django.contrib.messages.middleware.MessageMiddleware'
17             if "django.contrib.messages" in INSTALLED_APPS else None,
18     # Uncomment the next line for simple clickjacking protection:
19     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
20     'pagination.middleware.PaginationMiddleware'
21             if "pagination" in INSTALLED_APPS else None,
22     'django.middleware.cache.FetchFromCacheMiddleware',
23     'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
24     'pybb.middleware.PybbMiddleware',
25     'forum.middleware.ForumMiddleware',
26     'wtem.middleware.ThreadLocalMiddleware'
27 ) if x is not None)