Django

Code

Ticket #5827 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

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

Reported by: andreas@pelme.se Assigned to: nobody
Milestone: Component: django.contrib.admin
Version: newforms-admin Keywords: nfa-blocker
Cc: andreas@pelme.se Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

5827.patch (510 bytes) - added by andreas@pelme.se on 10/27/07 21:23:08.

Change History

10/27/07 21:23:08 changed by andreas@pelme.se

  • attachment 5827.patch added.

10/27/07 21:25:20 changed by anonymous

  • needs_better_patch changed.
  • 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).
  • needs_tests changed.
  • needs_docs changed.

10/27/07 21:28:41 changed 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.)

12/08/07 08:06:37 changed by Karen Tracey <kmtracey@gmail.com>

  • keywords set to nfa-blocker.
  • 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.

01/01/08 23:30:34 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #5827 (NameError - when trying to login with e-mail address (import missing))




Change Properties
Action