Opened 8 years ago

Closed 7 years ago

#5827 closed (fixed)

NameError - when trying to login with e-mail address (import missing)

Reported by: andreas@… Owned by: nobody
Component: contrib.admin Version: newforms-admin
Severity: Keywords: nfa-blocker
Cc: andreas@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

NameError at /admin/
global name 'User' is not defined

Request Method:	POST
Request URL:	http://127.0.0.1:8000/admin/
Exception Type:	NameError
Exception Value:	global name 'User' is not defined
Exception Location:	/.../django/contrib/admin/sites.py in login, line 228
Python Executable:	/opt/local/Library/Frameworks/Python.framework/Versions/2.4/Resources/Python.app/Contents/MacOS/Python
Python Version:	2.4.4

User model class is not imported. A simple fix is attached.

Attachments (1)

5827.patch (510 bytes) - added by andreas@… 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by andreas@…

comment:1 Changed 8 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from NameError - when trying to login with e-mail address (import mis) to [patch] NameError - when trying to login with e-mail address (import missing)

comment:2 Changed 8 years ago by mtredinnick

  • Summary changed from [patch] NameError - when trying to login with e-mail address (import missing) to NameError - when trying to login with e-mail address (import missing)

(Please don't add [patch] to titles. It makes them less readable. We already have the "has_patch" checkbox for this.)

comment:3 Changed 8 years ago by Karen Tracey <kmtracey@…>

  • Keywords nfa-blocker added
  • Triage Stage changed from Unreviewed to Ready for checkin

Minor problem, but a regression from old admin and trivial to fix. I verified the patch applies and fixes the problem so marked ready for checkin.

comment:4 Changed 7 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [6988]) newforms-admin: Fixed #5827 -- Added missing import to django/contrib/admin/sites.py. Thanks, andreas@…

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