Opened 5 years ago
Closed 5 years ago
#32493 closed Cleanup/optimization (fixed)
Remove unnecessary use of never_cache in admin views
| Reported by: | Tim McCurrach | Owned by: | Tim McCurrach |
|---|---|---|---|
| Component: | contrib.admin | Version: | 3.1 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
All admin views (apart from login) are wrapped with self.admin_view which applies never_cache already. Decorating the views themselves with never_cache is superfluous.
Change History (6)
comment:1 by , 5 years ago
| Has patch: | set |
|---|
follow-up: 3 comment:2 by , 5 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 5 years ago
Replying to Carlton Gibson:
OK, I'll accept this as it looks correct… — I feel like we should have some tests that admin views are in fact correctly wrapped, but e.g. #32468 didn't have them 🤔
A lot of tests crash without 63bbfa9f4501425f4bdabe05a79132a22dfbeb5a because we added an error message in the subsequent commit 3fd82a62415e748002435e7bad06b5017507777c.
comment:4 by , 5 years ago
I feel like we should have some tests...
Covered by admin_views.tests.NeverCacheTests
comment:5 by , 5 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
OK, I'll accept this as it looks correct… — I feel like we should have some tests that admin views are in fact correctly wrapped, but e.g. #32468 didn't have them 🤔