Opened 13 years ago
Closed 13 years ago
#17333 closed Bug (fixed)
Errors when reversing admin URLs when custom ModelAdmin doesn't provide model add/change URLs
Reported by: | Ramiro Morales | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Release blocker | 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
(Originally reported here)
Commit r16857 introduced a backward incompatible behavior of the admin app's master index and per-app index views.
The commit introduces changes in the template context building process that assume add and change permissions on models are always present when it is going to check for them. This fails with projects where these permissions might have been completely removed.
Attachments (2)
Change History (10)
comment:1 by , 13 years ago
Type: | Uncategorized → Bug |
---|
comment:2 by , 13 years ago
Severity: | Normal → Release blocker |
---|
comment:3 by , 13 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
by , 13 years ago
Attachment: | 17333-wip-regression-tests.diff added |
---|
comment:4 by , 13 years ago
With regard to the original bug report, there is a fix out there, at least for django-mailchimp: https://github.com/JohnRandom/django-mailchimp/commit/a8bfef1581ce43a2ea6f56a3707f14a611596148
comment:5 by , 13 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
by , 13 years ago
Attachment: | 17333-1.diff added |
---|
Avoid NoRevereMatch when a custom ModelAdmin.get_urls() doesn't call super()
comment:6 by , 13 years ago
Has patch: | set |
---|
comment:7 by , 13 years ago
Summary: | Errors when reversing admin URLs when add/change standard permissions don't exist → Errors when reversing admin URLs when custom ModelAdmin doesn't provide model add/change URLs |
---|
Actually, I can't reproduce this, i.e. cant create a regression test.
Things tried:
And no NoReverseMatch exception gets triggered originally reported here. I'm attaching the WIP patch for the tests and closing this worksforme.
I'm not going to change anything until we can reproduce the failing condition. It would be great if the user kingtut that posted that comment can give us additional feedback, bonus points if he can modify the test case to fail.