Show links on cards, cycle alphabetically
[copyspeak.git] / src / copyspeak / settings / middleware.py
1 from . import INSTALLED_APPS
2
3
4 MIDDLEWARE_CLASSES = tuple(x for x in (
5     'django.contrib.sessions.middleware.SessionMiddleware'
6             if "django.contrib.sessions" in INSTALLED_APPS else None,
7     #'django.middleware.locale.LocaleMiddleware',
8     'fnpdjango.middleware.URLLocaleMiddleware',
9
10     'django.middleware.common.CommonMiddleware',
11     'django.middleware.csrf.CsrfViewMiddleware',
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.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
23     'fnpdjango.middleware.SetRemoteAddrFromXRealIP'
24 ) if x is not None)