django Cannot find static/css files error 404

on the setting.py file try using this syntax:

STATICFILES_DIRS = [ os.path.join (BASE_DIR, "static"), '/ Var / www / static /', ]


EDIT: It seems that the OP mispelled the STATICFILES_DIRS setting, missing an 'S'.

Within your Django app directory create a subdirectory static and then within that directory, create another one named the same as the name of your Django app. Then move your css directory inside that latest mentioned directory.

So, something like this:

- your_django_app
-- static
--- your_django_app
---- css
----- bootstrap.min.css

Then you'll be able to use in your templates like this:

<link rel="stylesheet" href="{% static 'your_django_app/css/bootstrap.min.css' %}">

As per @bonidjkic's comment: I believe that you misspelled the STATICFILES_DIRS setting (you're missing an 'S'), this was the problem.

Thank you ever so much, I feel so stupid as to how I had ever missed that.