Change JSONField implementation
[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     'piwik.django.middleware.PiwikMiddleware'
19             if "piwik.django" in INSTALLED_APPS else None,
20     # Uncomment the next line for simple clickjacking protection:
21     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
22     'pagination.middleware.PaginationMiddleware'
23             if "pagination" in INSTALLED_APPS else None,
24     'django.middleware.cache.FetchFromCacheMiddleware',
25     'fnpdjango.middleware.SetRemoteAddrFromXRealIP',
26     'pybb.middleware.PybbMiddleware',
27     'forum.middleware.ForumMiddleware'
28 ) if x is not None)