Use a middleware rather than inspect the stack to get current user and IP
This commit is contained in:
parent
fffd674c44
commit
20e2d41563
3 changed files with 65 additions and 41 deletions
|
|
@ -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']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue