Question

What is the necessity to do collectstatic in django? Why can't I just copy files to the static folder and make my server refer to that folder? Why does that not work?

Was it helpful?

Solution

Convenience? You can manually copy over the static files and there's no problem with doing that, but when you have multiple different folders where static files are stored and you're deploying to a production server, it's much more of a hassle to go individually to each folder and copy them instead of having collectstatic run as an automated task and do the work for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top