May 11, 2025
What does collectstatic command do in Django?
Through collectstatic command do in Django we can collect static files such as js, css and image files and we can copy it into a specified folder, which is configured in settings.py file. We can run python manage.py collectstatic command to collect static files. We can put static files manually also but using collectstatic command we can save ourselves for manual work. Below is example of collectstatic command :
Sample Code
python manage.py collectstatic