Opened 8 years ago

Closed 8 years ago

#17189 closed Bug (fixed)

form_url not passed to change_password.html

Reported by: marc3@… Owned by: nobody
Component: contrib.admin Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no



I have put TEMPLATE_STRING_IF_INVALID = 'TAG' in my If I go to the admin, open a user and try to modify the password (using the admin password change form), this the (abstract) code that is generated, which of course fails:

<form action="TAG" method="post" id="user_form"><div style='display:none'><input type='hidden' name='csrfmiddlewaretoken' value='e89f493c88a4059f820eb35af0528722' /></div>


Attachments (1)

17189.patch (4.2 KB) - added by michal@… 8 years ago.
Fixes passing form_url to change_password.html template

Download all attachments as: .zip

Change History (4)

comment:1 Changed 8 years ago by Julien Phalip

Summary: Change password admin form uses an undefined template tagform_url not passed to change_password.html
Triage Stage: UnreviewedAccepted

The problem is that no variable form_url is passed to the change_password.html template. UserAdmin.user_change_password() could be improved to pass that variable, and also to allow overriding it as UserAdmin.add_view() already does. See also #7758 for a related issue.

Changed 8 years ago by michal@…

Attachment: 17189.patch added

Fixes passing form_url to change_password.html template

comment:2 Changed 8 years ago by Tomek Paczkowski

Triage Stage: AcceptedReady for checkin

It works.

comment:3 Changed 8 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

In [17466]:

Fixed #7758 and #17189 -- Allowed to override the form_url context var in the admin change view and the user admin's password change view. Thanks, michal and krzysztof.szczesny.

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