Question

I created a new django app (with dj-static), enabled the admin app, started the server and to my surprise, the css files in the admin were available even though i did not run collectstatic.

So, I created a few static files in my static directory and then when I ran collectstatic, the CLI showed the admin static files being moved to the static root folder along with my other static files.

How does the static files for admin work without collectstatic? And if it works without collectstatic, why move it to static root?

Thanks.

Was it helpful?

Solution

You don't need collectstatic for any app when you're running under the development server. collectstatic is for moving apps' static files into a central location so that they can be served with the asset server.

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