Skip to content
Advertisement

Django: Not Found static/admin/css

I just deployed my first Django app on Heroku but I notice that it doesn’t have any CSS like when I runserver on the local machine. I know there’s something wrong with static files but I don’t understand much about it even when I already read the docs. I can do

python3 manage.py collectstatic

to create a static folder but I don’t know where to put it and how to change the DIRS in settings.py. I really need some help to get rid of it.

root directory

settings.py:

JavaScript

heroku logs:

JavaScript

Advertisement

Answer

You shouldn’t change BASE_DIR

In settings.py edit the value of STATIC_ROOT

JavaScript

And run collectstatic again

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement