1
If you’re getting a 404 error you should ensure debugging mode is on. If I assume it is on (as it is in the settings.py
you have on GitHub), then your web server just isn’t serving the static files. I would ensure you’ve run python manage.py collectstatic
which will push the static files for the project to the static folder you’ve defined in settings.py
.
I would also ensure that you’ve configured Python Anywhere to serve these files. According to their website (source: https://help.pythonanywhere.com/pages/DjangoStaticFiles/) you should ensure you have that static folder added so their server knows to serve the files. The steps at that link are as follows:
- Go to the Web tab on the PythonAnywhere dashboard
- Go to the Static Files section
- Enter the same URL as STATIC_URL in the url section (typically, /static/)
- Enter the path from STATIC_ROOT into the path section (the full path, including /home/username/etc)
Source:stackexchange.com