25👍
Why not just serve your static
directory? You might use more than one app, and some of your apps may not be under your control. Before the staticfiles
app existed, you then had to either manually copy the static files for all apps to a common directory, upload them to your CDN, or symlink them to the document root of your web server.
The staticfiles app established a convention: put static files for each app under a static
directory and let Django do the work for you.
12👍
The STATIC_ROOT
can be on a different machine than the application, so copying your static files to the static root means that you can serve your static files from a different server (CDN FTW!) which you wouldn’t be able to do if those files where only located within their respective app directories.
- Pycharm (Python IDE) doesn't auto complete Django modules
- Is there any list of blog engines, written in Django?
- How to add attributes to option tags?
- Can Django run on Gunicorn alone (no Apache or nginx)?