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.
Source:stackexchange.com