[Answer]-Django – recommended way to serve static files without having to change too much code when deploying?

1👍

You don’t change any code, because it’s not your code that serves static files. You need to configure your web server to do it; which is fine, because you’re configuring your web server anyway for deployment.

The whole point of the staticfiles app in Django is just that, that it manages files for you in development and puts them in a single place for deployment so you can point your web server at them.

Leave a comment