I’m relatively new to Django (1.4) and I’m having a hard time understanding the philosophy behind static, media, and admin files. The structure of the project is different from one tutorial to another, and same thing for Webfaction(where I’ll be hosting my application). I would like to know what is the optimal way to organize it and with least pain and editing while deploying it to Webfaction, what is the point of static media, adn admin files?
Thank you in advance
I’m relatively new to Django (1.4) and I’m having a hard time understanding the
Share
In essence you want to serve static files by django in development. Once you’re ready to go into production you want the server to do this for you (they are build to do it fast :-))
Here’s a basic setup, once you login the server you run the collectstatic command to get all the staticfiles in the static-root folder, which your server points to (see the rewrite rules)
settings.py
settings_deployment.py
urls.py
django.conf (lighttpd, this could be apache or nginx) but I believe webfaction has an app service to set this up easily