Staticfiles in Django 1.3 not working?

Wasted a lot of time on this today when I shouldn’t have done.

If you find that your staticfiles in Django are just not working for you, when the docs say they should be, try this. The docs say here that:

“This view is automatically enabled and will serve your static files at STATIC_URL when you use the built-in runserver management command.”

Well, it doesn’t work for me. As per the example after I had to amend my specifically – i.e.:
[cc lang=”python”]
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

# … the rest of your URLconf goes here …

urlpatterns += staticfiles_urlpatterns()
If anyone knows whether this is a bug or just me please tell me.

Leave a Reply

Your email address will not be published. Required fields are marked *