I know this question as been asked hundreds of times but no matter what I try out, I can not get it to load the static files. The strange thing is, when i run 'collectstatic' it put the admin static files in the right place. But when I browse to one of my pages, I get a 404 error on my css/js
This is for a local django project.
settings:
DEBUG=True
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "static")
urls:
urlpatterns = [
url(r'^admin/', include(admin.site.urls)), ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
template:
{% load staticfiles %}
<!DOCTYPE html> <html lang="en"> <head>
<link href="{% static 'css/style.css' %}" rel="stylesheet">