Opened 9 years ago
Closed 9 years ago
#27626 closed Cleanup/optimization (fixed)
Move MEDIA_URL/STATIC_URL ends with traling slash validation to system checks
| Reported by: | Adam Johnson | Owned by: | Adam Johnson |
|---|---|---|---|
| Component: | Core (System checks) | Version: | 1.10 |
| Severity: | Normal | Keywords: | |
| Cc: | me@… | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | yes |
| Easy pickings: | no | UI/UX: | no |
Description
BaseSettings has a __setattr__ method just to check that MEDIA_URL and STATIC_URL don't end with a slash. I think these would be better off as system checks, which would avoid the overhead on every single change of settings. The code pre-dates checks by a few years which would explain why it was done like that.
Change History (2)
comment:1 by , 9 years ago
| Component: | Core (Other) → Core (System checks) |
|---|---|
| Has patch: | set |
| Patch needs improvement: | set |
| Summary: | Remove unnecessary setattr code path in settings → Move MEDIA_URL/STATIC_URL ends with traling slash validation to system checks |
| Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.
PR with a few comments for improvement.