I've got django admin working on my django website, but the static css files give 404s. I see this in the browsers network tab, but in the terminal where I run python manage.py runserver
I see no output of any request being made whatsoever. This is what I see in the browser:
So I suppose there's something wrong with my STATIC_URL
or STATIC_ROOT
:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
I ran python manage.py collectstatic
, which created a bunch of nested folders containing static files.
So I checked out the terminal output of the runserver command, expecting to see the 404s. But after I got the 404s in the browser I only see this in the terminal:
$ ./manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
March 03, 2021 - 20:19:44
Django version 3.0.11, using settings 'main.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
So at this point I'm lost as to how I can solve this. Why don't I see the requests in the terminal? The dev server is definitely working, because when I stop the dev server the site doesn't load at all anymore.
Any help in how to debug this would be welcome!