Opened 11 years ago
Closed 11 years ago
#23786 closed Bug (worksforme)
tutorial bug for django.contrib.auth.middleware.SessionAuthenticationMiddleware
| Reported by: | bedros | Owned by: | nobody | 
|---|---|---|---|
| Component: | Documentation | Version: | 1.7 | 
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description
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.
Change History (2)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
| Resolution: | → worksforme | 
|---|---|
| Status: | new → closed | 
  Note:
 See   TracTickets
 for help on using tickets.
    
Hi,
django.contrib.auth.middleware.SessionAuthenticationMiddlewareis new in 1.7 (and part of the default value forsettings.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.