Thursday, June 27, 2013

Static files not served

Hi all,

I have a local development project where I put all static media in a 'static' subdirectory of my app (/project/app/static/). I then created a 'static' directory in the root folder of my project (/project/static/) and specified that as my STATIC_ROOT in settings.py.

When I run the './manage.py collectstatic' command, all static media are added to the static root as expected. In the templates, usage is as follows: '<script src="{% static "js/jquery.min.js" %}"></script>' and so on, but when I view the page in a browser the CSS and js are not applied. If I view page source and click on the generated links to static resources, I do see them.

One thing I do notice is that two of the missing css files are in the document's noscript tag and the links for all three are not clickable when viewing source. There are three in there, so one loads fine.

Any pointers to what I could be missing? Thanks.
--
Regards,
Sithu Lloyd Dube

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment