Collectstatic collects all static files inside all apps and put a copy inside the static directory declared in settings.py
eg: confing/static/img/photo.jpg –> static/img/photo.jpg
Important in production (when debug is false) because they will be served from that folder
python manage.py collectstatic --noinput
Some commonly used options are:
Do NOT prompt the user for input of any kind.
Ignore files, directories, or paths matching this glob-style pattern. Use multiple times to ignore more. When specifying a path, always use forward slashes, even on Windows.
--ignore PATTERN, -i PATTERN
Do everything except modify the filesystem.
Clear the existing files before trying to copy or link the original file.
Create a symbolic link to each file instead of copying.
Don’t call the post_process() method of the configured STATICFILES_STORAGE storage backend.
Don’t ignore the common private glob-style patterns ‘CVS’, ‘.*’ and ‘*~’.
For a full list of options, refer to the commands own help by running:
$ python manage.py collectstatic --help