Opened 7 years ago

Closed 7 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 Tim Graham, 7 years ago

Component: Core (Other)Core (System checks)
Has patch: set
Patch needs improvement: set
Summary: Remove unnecessary setattr code path in settingsMove MEDIA_URL/STATIC_URL ends with traling slash validation to system checks
Triage Stage: UnreviewedAccepted

PR with a few comments for improvement.

comment:2 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In 8669cf0:

Fixed #27626 -- Moved MEDIA_URL/STATIC_URL validation to a system check.

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