I\'m new to Django. I read the Documentation and I am literally confused with media root files and static root files and where I should be placing my css files along with my
I would suggest you to keep all your js and css files in a folder named, 'static' some where outside your application folder (that's how django recommends it) For example, if you keep it under /var/www/static/ So, in this case this is how your attributes would look like: STATIC_DIR = "/var/www/static/" STATIC_URL = "/static/" (Can be anything) STATICFILES_FINDERS = ('django.contrib.staticfiles.finders.FileSystemFinder',)
In the template you can refer the static folder using template tag {{STATIC_URL}} and append the rest of the path to the file from the static folder. Note, to use the {{STATIC_URL}} template tag you would need to pass the context_instance from the view code.