Opened 8 years ago

Closed 8 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: master
Severity: Keywords: login
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 8 years ago.
Patch to solve login() site table issue
contrib.auth.views.login_fixed.patch (532 bytes) - added by mconte 8 years ago.
Fixed previous patch. Please delete the old one.
contrib.auth.views.login_fixed2.patch (799 bytes) - added by mconte 8 years ago.
Sorry :( This is the patch. Forget the others.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by mconte

Patch to solve login() site table issue

comment:1 Changed 8 years ago by Simon G. <dev@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

Changed 8 years ago by mconte

Fixed previous patch. Please delete the old one.

Changed 8 years ago by mconte

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

comment:2 Changed 8 years ago by mir@…

  • Component changed from Generic views to Contrib apps
  • Resolution set to invalid
  • Status changed from new to 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.

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