Opened 17 years ago

Closed 17 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: no UI/UX: no

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@… 17 years ago.

Download all attachments as: .zip

Change History (5)

by andreas@…, 17 years ago

Attachment: 5827.patch added

comment:1 by anonymous, 17 years ago

Summary: NameError - when trying to login with e-mail address (import mis)[patch] NameError - when trying to login with e-mail address (import missing)

comment:2 by Malcolm Tredinnick, 17 years ago

Summary: [patch] NameError - when trying to login with e-mail address (import missing)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 by Karen Tracey <kmtracey@…>, 17 years ago

Keywords: nfa-blocker added
Triage Stage: UnreviewedReady 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 by Adrian Holovaty, 17 years ago

Resolution: fixed
Status: newclosed

(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