Reputation: 8529
can i get the current session or cookie inside a middleware?
I tried but I got:
'WSGIRequest' object has no attribute 'session'
Upvotes: 1
Views: 803
Reputation: 599788
This will work in any middleware that comes after django.contrib.sessions.middleware.SessionMiddleware
in settings.py.
Upvotes: 5