Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#27661 closed Cleanup/optimization (fixed)

Move FileSystemFinder ImproperlyConfigured errors to system checks

Reported by: Jerome Leclanche Owned by: Ling-Xiao Yang
Component: contrib.staticfiles Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

FileSystemFinder currently checks for the following on __init__:

  • Whether STATICFILES_DIRS is a list or tuple, failing if it's not
  • Whether STATICFILES_DIRS contains a directory equivalent to STATIC_ROOT

I'd like to suggest moving both of those checks to the Django system checks framework. As it is, they happen at runtime which delays when the error shows up.

Change History (7)

comment:1 by Tim Graham, 8 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Ling-Xiao Yang, 8 years ago

Owner: changed from nobody to Ling-Xiao Yang
Status: newassigned

comment:3 by Ling-Xiao Yang, 8 years ago

Has patch: set

comment:4 by Tim Graham, 8 years ago

Patch needs improvement: set

comment:5 by Tim Graham, 8 years ago

Patch needs improvement: unset

comment:6 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 0ec4dc9:

Fixed #27661 -- Moved FileSystemFinder's ImproperlyConfigured exceptions to system checks.

Thanks Simon Charette, Mariusz Felisiak, Tim Graham, and Adam Johnson
for review.

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In b23e3a1c:

Refs #27661 -- Added Tags.staticfiles.

Follow up to 0ec4dc91e0e7befdd06aa0613b5d0fbe3c785ee7.

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