Opened 17 years ago

Closed 17 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)

contrib.auth.views.login.patch (1.1 KB ) - added by mconte 17 years ago.
Patch to solve login() site table issue
contrib.auth.views.login_fixed.patch (532 bytes ) - added by mconte 17 years ago.
Fixed previous patch. Please delete the old one.
contrib.auth.views.login_fixed2.patch (799 bytes ) - added by mconte 17 years ago.
Sorry :( This is the patch. Forget the others.

Download all attachments as: .zip

Change History (5)

by mconte, 17 years ago

Patch to solve login() site table issue

comment:1 by Simon G. <dev@…>, 17 years ago

Triage Stage: UnreviewedDesign decision needed

by mconte, 17 years ago

Fixed previous patch. Please delete the old one.

by mconte, 17 years ago

Sorry :( This is the patch. Forget the others.

comment:2 by mir@…, 17 years ago

Component: Generic viewsContrib apps
Resolution: invalid
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top