#22362: Authentication Middleware assertion message is only partially correct -----------------------------------------+-------------------- Reporter: Keryn Knight <django@…> | Owner: nobody Type: Cleanup/optimization | Status: new Component: contrib.auth | Version: master Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 1 | UI/UX: 0 -----------------------------------------+-------------------- Currently, the [https://github.com/django/django/blob/5d263dee304fdaf95e18d2f0619d6925984a7f02/django/contrib/auth/middleware.py#L16 middleware says] ''The Django authentication middleware requires session middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.sessions.middleware.SessionMiddleware'.'' which is true, but doesn't expound the need for the session middleware to be '''before''' the auth middleware, because it acts on the ''request''.
eg: {{{ MIDDLEWARE_CLASSES = ( 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', ) }}} would fail the assertion, where {{{ MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ) }}} would pass. -- Ticket URL: <https://code.djangoproject.com/ticket/22362> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/080.78ff9c391b947933e6bca57fadd77a6a%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.