Opened 19 years ago
Closed 19 years ago
#4225 closed (invalid)
if table site is not created contrib.auth.views.login raise exception
| Reported by: | mconte | Owned by: | Jacob |
|---|---|---|---|
| Component: | Contrib apps | Version: | dev |
| Severity: | Keywords: | login | |
| Cc: | Triage Stage: | Design decision needed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
When django.contrib.sites is not in your INSTALLED_APPS. That means: table is not generated (Which is my case) login() from contrib.auth.views raise table not found exception.
I'm attaching one patch to solve this issue, adding a generic site class [This is the same way used in others views]
Attachments (3)
Change History (5)
by , 19 years ago
| Attachment: | contrib.auth.views.login.patch added |
|---|
comment:1 by , 19 years ago
| Triage Stage: | Unreviewed → Design decision needed |
|---|
by , 19 years ago
| Attachment: | contrib.auth.views.login_fixed.patch added |
|---|
Fixed previous patch. Please delete the old one.
by , 19 years ago
| Attachment: | contrib.auth.views.login_fixed2.patch added |
|---|
Sorry :( This is the patch. Forget the others.
comment:2 by , 19 years ago
| Component: | Generic views → Contrib apps |
|---|---|
| Resolution: | → invalid |
| Status: | new → closed |
This isn't a bug at all.
contrib.auth depends on contrib.site, and you should put contrib.site in INSTALLED_APPS. If you do this, the site table will be installed.
Patch to solve login() site table issue