[Answer]-Is there a STATICFILES_IGNORE_PATTERN setting?

1👍

No, you can not do that. Here are the lines that corresponds with file ignoring in collectstatic command:

ignore_patterns = options['ignore_patterns']
if options['use_default_ignore_patterns']:
    ignore_patterns += ['CVS', '.*', '*~']
self.ignore_patterns = list(set(ignore_patterns))

The best way to achive your goal is to write a custom management command. You can use django.contrib.staticfiles.management.commands.collectstatic as an inspiration.

Leave a comment