Code

Opened 3 years ago

Closed 3 years ago

#15228 closed (duplicate)

TEMPLATE_STRING_IF_INVALID breaks admin

Reported by: CarlFK Owned by: nobody
Component: contrib.admin Version: 1.3-beta
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

stock django user auth, trying to change password = error.

http://localhost:8080/admin/auth/user/1/
"Use '[algo]$[salt]$[hexdigest]' or use the _change password form_" click
abc<tab>abc click done:

RuntimeError at /admin/auth/user/1/password/template_error

You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to localhost:8080/admin/auth/user/1/password/template_error/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by CarlFK

  • Component changed from Authentication to django.contrib.admin
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from admin/.../password/template_error to TEMPLATE_STRING_IF_INVALID breaks admin

in my settings.py:

TEMPLATE_STRING_IF_INVALID = 'template_error'

comment:2 Changed 3 years ago by mattmcc

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

Yes, it does break the admin. This is documented behavior, but #3579 tracks resolving the dependency.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.