Opened 13 years ago

Closed 13 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

Description

Hello,

I have put TEMPLATE_STRING_IF_INVALID = 'TAG' in my settings.py. 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>
<div>

Regards

Attachments (1)

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

Download all attachments as: .zip

Change History (4)

comment:1 by Julien Phalip, 13 years ago

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.

by michal@…, 13 years ago

Attachment: 17189.patch added

Fixes passing form_url to change_password.html template

comment:2 by Tomek Paczkowski, 13 years ago

Triage Stage: AcceptedReady for checkin

It works.

comment:3 by Jannis Leidel, 13 years ago

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