[Django] #23786: tutorial bug for django.contrib.auth.middleware.SessionAuthenticationMiddleware

22 views
Skip to first unread message

Django

unread,
Nov 9, 2014, 6:56:10 PM11/9/14
to django-...@googlegroups.com
#23786: tutorial bug for
django.contrib.auth.middleware.SessionAuthenticationMiddleware
-------------------------------+--------------------
Reporter: bedros | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
when trying the tutorial part 5

in section testing the views

I got the error


{{{

ImproperlyConfigured: Module "django.contrib.auth.middleware" does not
define a "SessionAuthenticationMiddleware" attribute/class


}}}

after some searching on the web, I discovered that I need to comment out
that middleware in the settings.py

I wish someone updates the tutorial to mention the above fix

It's such show stopper for someone trying django tutorials for first time.

--
Ticket URL: <https://code.djangoproject.com/ticket/23786>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 9, 2014, 6:56:45 PM11/9/14
to django-...@googlegroups.com
#23786: tutorial bug for
django.contrib.auth.middleware.SessionAuthenticationMiddleware
-------------------------------+--------------------------------------

Reporter: bedros | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by bedros):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/23786#comment:1>

Django

unread,
Nov 10, 2014, 2:15:06 AM11/10/14
to django-...@googlegroups.com
#23786: tutorial bug for
django.contrib.auth.middleware.SessionAuthenticationMiddleware
-------------------------------+--------------------------------------
Reporter: bedros | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 1.7
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by bmispelon):

* status: new => closed
* resolution: => worksforme


Comment:

Hi,

`django.contrib.auth.middleware.SessionAuthenticationMiddleware` is new in
1.7 (and part of the default value for `settings.MIDDLEWARES`).

It seems that you're using a settings file made for Django 1.7 but you're
running an older version of Django.
Upgrading Django to 1.7 or re-generating your settings file with the
appropriate version should fix the issue.

Thanks.

--
Ticket URL: <https://code.djangoproject.com/ticket/23786#comment:2>

Reply all
Reply to author
Forward
0 new messages