Django

Code

Ticket #8493 (closed: fixed)

Opened 3 months ago

Last modified 3 months ago

NoReverseMatch error on password_change_done when changing passwords in the admin interface

Reported by: mtrichardson Assigned to: nobody
Milestone: 1.0 Component: django.contrib.admin
Version: SVN Keywords: aug22sprint
Cc: adam@therobots.org Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

admin.sites.root passes password_change information off to contrib.auth, which then calls reverse('django.contrib.auth.password_change_done') to figure out where to 302 the user. However, that fails since that function is not actually hooked up in any urlconf - any admin apps are a thin layer in front of contrib.auth and don't actually associate any urls. This effectively means that any admin's change password functionality is broken - the password is actually changed, but you get a nasty 500 during the process.

Attachments

8493.hackish_try_except_to_get_admin_working.diff (1.5 kB) - added by mtrichardson on 08/22/08 18:16:08.
If there's a NoReverseMatch?, catch it and HttpResponseRedirect? to a relative path of 'done/'. *shudder*
8493_special_admin_password_change.1.diff (4.4 kB) - added by brosner on 08/22/08 20:40:47.
better patch that has a new feature side-effect

Change History

08/22/08 18:08:20 changed by RobotAdam

  • cc set to adam@therobots.org.
  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

08/22/08 18:16:08 changed by mtrichardson

  • attachment 8493.hackish_try_except_to_get_admin_working.diff added.

If there's a NoReverseMatch?, catch it and HttpResponseRedirect? to a relative path of 'done/'. *shudder*

08/22/08 20:12:13 changed by mtrichardson

  • keywords set to aug22sprint.

08/22/08 20:40:47 changed by brosner

  • attachment 8493_special_admin_password_change.1.diff added.

better patch that has a new feature side-effect

08/22/08 20:41:14 changed by brosner

I added a keyword argument to the other views for consistency.

08/22/08 22:26:01 changed by brosner

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

(In [8473]) Fixed #8493 -- Fixed a NoReverseMatch? when redirecting to password_change/done/ in the admin. Added the ability to override redirects to other password change views for consistency. Thanks for the report mtrichardson.


Add/Change #8493 (NoReverseMatch error on password_change_done when changing passwords in the admin interface)




Change Properties
Action