Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 644 Bytes

README.rst

File metadata and controls

31 lines (27 loc) · 644 Bytes

About

Filtered static finders for django staticfiles. When collectstatic is called, finder check each filename. If filename matches STATICFILES_INCLUDE and do not matches STATICFILES_EXLUDE then file will be copied, else skipped.

Install

Add to settings.py:

STATICFILES_FINDERS = (
    'staticfinders.FilteredFileSystemFinder',
    'staticfinders.FilteredAppDirectoriesFinder',
)
STATICFILES_INCLUDE = (
    '*.js',
    '*.css',
    '*.png',
    '*.jpg',
    '*.jpeg',
    '*.woff',
)
STATICFILES_EXCLUDE = (
    'templates*',
    'blocks*',
    'img/sprites/*/*.png'
)