Skip to content Skip to sidebar Skip to footer

Bootstrap Files 404 Django

On FireBug I get these errors GET http://localhost:8000/static/bootstrap/css/bootstrap.min.css 404 (NOT FOUND) localhost/:7 GET http://localhost:8000/static/bootstrap/js/b

Solution 1:

Development Server:

Leave STATIC_ROOT empty.

Make a change to STATICFILES_DIRS

STATICFILES_DIRS = (

'/home/bradford/Development/Django/public_pictures/static',

)

Run ./manage.py collectstatic

Should work.

Solution 2:

It seems that you have forgot to include your static url in urls.py. If you are using development server you can use the following code in urls.py:

from django.conf import settings
from django.conf.urls.static import static

urlpatterns = patterns('',
    # ... the rest of your URLconf goes here ...
) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

More reference on deploying static files for development or for production.

Post a Comment for "Bootstrap Files 404 Django"