1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 09:58:23 +02:00

Use a middleware rather than inspect the stack to get current user and IP

This commit is contained in:
Yohann D'ANELLO
2020-03-10 00:01:40 +01:00
parent fffd674c44
commit 20e2d41563
3 changed files with 65 additions and 41 deletions

View File

@ -73,7 +73,11 @@ if "cas" in INSTALLED_APPS:
'cas_explained',
]
AUTHENTICATION_BACKENDS += ('cas.backends.CASBackend',)
if "logs" in INSTALLED_APPS:
MIDDLEWARE += ('logs.middlewares.LogsMiddleware',)
if "debug_toolbar" in INSTALLED_APPS:
MIDDLEWARE.insert(1,"debug_toolbar.middleware.DebugToolbarMiddleware")
INTERNAL_IPS = [ '127.0.0.1']