Opened 11 years ago
Closed 11 years ago
#20640 closed Bug (fixed)
`get_deleted_objects` causes an error if there is no change view.
Reported by: | Owned by: | Rainer Koirikivi | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The format_callback used for rendering the objects to be deleted on the confirmation screen doesn't attempt to fail gracefully, if there is no named URL fitting the "namespace:appname_modelname_change" - if get_urls()
is overridden on a ModelAdmin
subclass to either change, remove or replace the change_view
, the delete page will never work due to a NoReverseMatch
.
Proposed solution: NoReverseMatch
should be caught, and the format should end up the same as if has_admin
were False
.
(note: link to GitHub above is to the latest revision in master, as I write this.)
Change History (5)
comment:1 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 11 years ago
Has patch: | set |
---|
Active work on this at: https://github.com/koirikivi/django/tree/ticket_20640
Pull request: https://github.com/django/django/pull/1485
Tests pass under postgresql and sqlite
comment:4 by , 11 years ago
Related issue (NoReverseMatch in changelist_view if the "namespace:appname_modelname_change" url is removed): #20934
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Created a test project and verified that the bug occurs.