Code

Opened 17 months ago

Closed 17 months ago

Last modified 17 months ago

#19331 closed Cleanup/optimization (fixed)

Missing trailing slashes in admin template breadcrumbs cause redirects

Reported by: ppetrid@… Owned by: nobody
Component: contrib.auth Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

In the admin templates, there are some trailing slashes missing since the new admin_urlname was introduced. For example, in admin/auth/user/change_password.html, line 16:

<a href="{% url opts|admin_urlname:'changelist' %}{{ original.pk }}">..

instead of

<a href="{% url opts|admin_urlname:'changelist' %}{{ original.pk }}/">..

This causes unnecessary redirects. I have not thoroughly checked all templates to know which have this problem.

Attachments (0)

Change History (7)

comment:1 Changed 17 months ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.4 to master

comment:2 Changed 17 months ago by claudep

After a quick scan, I don't think there are other occurrences. Anyway, I will fix this one ASAP.

comment:3 Changed 17 months ago by Claude Paroz <claude@…>

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

In 8c21c53c8b7325afb38c94764a57d1f095c88b41:

Fixed #19331 -- Added missing trailing slash in auth admin template

Thanks ppetrid at yawd.eu for the report.

comment:4 Changed 17 months ago by Claude Paroz <claude@…>

In e15df5b6b56235059f45628f651cdb0e91c632a3:

[1.5.x] Fixed #19331 -- Added missing trailing slash in auth admin template

Thanks ppetrid at yawd.eu for the report.
Backport of 8c21c53c8 from master.

comment:5 Changed 17 months ago by Ramiro Morales <cramm0@…>

In 8fdb28219df22245d7e50b4e8374d8567ca84f0f:

Fixed #19331 (again) use the right admin named URL.

This allows us to get the trailing slash in URLs without having to
manually assemble and hard-code them.

See also commits e9497a, a222d6, f51eab, 5a9e12.

comment:6 Changed 17 months ago by ramiro

  • Summary changed from Missing taining slashes in admin template breadcrumbs cause redirects to Missing trailing slashes in admin template breadcrumbs cause redirects

comment:7 Changed 17 months ago by Ramiro Morales <cramm0@…>

In 1220f22b88c324d84e6e0f52115d3f00fcba46b6:

[1.5.x] Fixed #19331 (again) use the right admin named URL.

This allows us to get the trailing slash in URLs without having to
manually assemble and hard-code them.

See also commits e9497a, a222d6, f51eab, 5a9e12.

Backport of 8fdb28219df22245d7e50b4e8374d8567ca84f0f from master.

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.