Cannot load static files

Hi everyone,

I’m trying to add some .css styling to my files but the issue is when I use the {% load staticfiles %} it gives me an error that says the following:

This is what my directory looks like:

and this is my current .setting file:

Debug is set to True.

What is the issue here?

See the docs at Built-in template tags and filters | Django documentation | Django

I have but it doesn’t seem to solve the issue. The syntax is identical to what is available on the docs.

Does anyone know exactly what the problem is why it is not finding the static .css file?

What you show in the image is not what’s in the docs.

I’ve changed the doctor.html file to the following:

<head>
    {% load static %}
    <link rel = "stylesheet" href = "{% static 'css/style.css' %}" type = "text/css" media = "screen">
</head>

While the server doesn’t break anymore I’m not seeing the actual changes on the webpage.

I do see a GET request has been fullfilled

[05/Dec/2021 07:41:02] "GET /static/css/style.css HTTP/1.1" 304 0

and this is my current configuration with .setting. Everything else remains the same.

STATIC_URL = '/static/'
STATICFILES_DIR = [
    BASE_DIR / 'static',
]

Ok, this is a different situation.

The HTTP 304 response code you’re seeing in your log is the key here - basically it’s saying that your browser is caching that file and not requesting a new version from the server.

See both replies at Changes in CSS (Style sheet) not reflecting in the Page