mirror of https://gitlab.crans.org/bde/nk20
django_htcpcp_tea in middleware only if in apps
This commit is contained in:
parent
abc88d0118
commit
82fea65b5e
|
@ -2,7 +2,7 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls import include
|
||||
from django.conf.urls import include
|
||||
from django.urls import re_path
|
||||
from rest_framework import routers
|
||||
|
||||
|
|
|
@ -90,12 +90,14 @@ MIDDLEWARE = [
|
|||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.contrib.sites.middleware.CurrentSiteMiddleware',
|
||||
'django_htcpcp_tea.middleware.HTCPCPTeaMiddleware',
|
||||
'note_kfet.middlewares.SessionMiddleware',
|
||||
'note_kfet.middlewares.LoginByIPMiddleware',
|
||||
'note_kfet.middlewares.TurbolinksMiddleware',
|
||||
'note_kfet.middlewares.ClacksMiddleware',
|
||||
]
|
||||
if "django_htcpcp_tea" in INSTALLED_APPS:
|
||||
MIDDLEWARE.append('django_htcpcp_tea.middleware.HTCPCPTeaMiddleware')
|
||||
|
||||
|
||||
ROOT_URLCONF = 'note_kfet.urls'
|
||||
|
||||
|
|
Loading…
Reference in New Issue