Opened 12 years ago

Closed 12 years ago

#20121 closed Cleanup/optimization (fixed)

LogEntry.get_admin_url uses a hard-coded path format.

Reported by: floppya Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Simon Charette Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description

The LogEntry model from contrib.admin assumes that admin change path for a ContentType always follows the {{app_name}}/{{model_name}}/{{id}}/ format. This causes incorrect links to be generated for the admin change log in cases where the model's change url is customized.

Change History (3)

comment:1 by floppya, 12 years ago

Easy pickings: set
Has patch: set

comment:2 by Simon Charette, 12 years ago

Cc: Simon Charette added
Patch needs improvement: set
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

The cleanup makes sense but the provided patch makes two regression tests fails.

comment:3 by Simon Charette <charette.s@…>, 12 years ago

Resolution: fixed
Status: newclosed

In a4b8a4b632dbb6d9fed1a8654aed99a9c53560d4:

Fixed #20121 -- Removed LogEntry.get_admin_url's hard-coded path.

Updated LogEntry.get_admin_url to use 'reverse' instead
of a hard-coded path.

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