definition of static_url, static_root, STATICFILES_DIRS.
static_url :
- it does nothing other then prepending onto your static file url
static_root :
- it is the root folder path where our static file will be saved after running
collectstatic
management command. it has nothing to do in our development server becauserunserver
helps us to serve our static files easily. but in Production server you wont be runningrunserver
. so thats where static_root comes into picture. if you are using any reverse proxy like nginx or apache then these proxy server needs some static root paths to serve static files.
STATICFILES_DIRS :
- It can be a tupel or a list of extra-static-paths where you have placed some static-files for your project/app.
- extra-static-paths : your static file folder other then
folder named
static
- extra-static-paths : your static file folder other then
folder named
Top comments (0)