1👍
Embarrassing… Forgot to reload PA.
For future reference, this is how you configure PA and django 1.8 static files according to the 1.8 documentation.
Don’t forget to reload!
0👍
STATIC_ROOT
and STATICFILES_DIRS
should not point to the same path. STATIC_ROOT
is where files are copied to be served for your production environment, usually by Apache or Nginx.
STATICFILES_DIRS
are served by the static application during local development.
I typically structure my projects as such:
my_project/
my_project/
static_assets/ <- STATICFILES_DIRS
images/
css/
less/
js/
static/ <- STATIC_ROOT
templates/
A link to a css file, for example would look like:
{% static 'css/foo.css' %}
the top level directory specified in STATICFILES_DIRS
is ommitted. From the looks of your sample code, it looks like your {% static %}
paths are not pointing to the right location.
See the static files app docs for more information.
- [Answer]-Python django class based view and functional view
- [Answer]-Access attributes from retrieved model object in django
- [Answer]-Django at extra_context 'unicode' object does not support item assignment