Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ミドルウェア内で現在のセッションまたはCookieを取得できますか?
試しましたが、次のようになりました。
'WSGIRequest' object has no attribute 'session'
これは、settings.pyの後 django.contrib.sessions.middleware.SessionMiddlewareに続くすべてのミドルウェアで機能します。
django.contrib.sessions.middleware.SessionMiddleware