Opened 5 years ago

Closed 4 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@… 4 years ago.
Fixes passing form_url to change_password.html template

Download all attachments as: .zip

Change History (4)

comment:1 Changed 5 years ago by julien

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from Change password admin form uses an undefined template tag to form_url not passed to change_password.html
  • Triage Stage changed from Unreviewed to Accepted

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 4 years ago by michal@…

Fixes passing form_url to change_password.html template

comment:2 Changed 4 years ago by oinopion

  • Triage Stage changed from Accepted to Ready for checkin

It works.

comment:3 Changed 4 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

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