Home > front end >  "GET /static/css/stylesheet.css HTTP/1.1" 404 1813
"GET /static/css/stylesheet.css HTTP/1.1" 404 1813

Time:06-28

I tried to ling CSS file in Django framework by using " "

It shows error

but, it is showing error ""GET /static/css/stylesheet.css HTTP/1.1" 404 1813file Oder"

CodePudding user response:

define STATIC_URL in settings.py like that:

STATIC_URL = 'static/'

and template file must be like that

{% load static %}

<link rel="stylesheet" type="text/css" href="{% static 'app/css/style.css' %}">

CodePudding user response:

Did you use following command after adding static files?

python manage.py collectstatic
  • Related