Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#8493 closed (fixed)

NoReverseMatch error on password_change_done when changing passwords in the admin interface

Reported by: mtrichardson Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords: aug22sprint
Cc: adam@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 (2)

8493.hackish_try_except_to_get_admin_working.diff (1.5 KB) - added by mtrichardson 8 years ago.
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 Brian Rosner 8 years ago.
better patch that has a new feature side-effect

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by RobotAdam

Cc: adam@… added

Changed 8 years ago by mtrichardson

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

comment:2 Changed 8 years ago by mtrichardson

Keywords: aug22sprint added

Changed 8 years ago by Brian Rosner

better patch that has a new feature side-effect

comment:3 Changed 8 years ago by Brian Rosner

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

comment:4 Changed 8 years ago by Brian Rosner

Resolution: fixed
Status: newclosed

(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.

comment:5 Changed 5 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

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