Django admin static files deployment Pythonanywhere
ian-veteran
Posted on November 6, 2024
Debugged Admin panel pain cross fingers so as it works
Pythonanywhere: https://iankarani.pythonanywhere.com/admin/login/?next=/admin/
Install module whitenoise: https://whitenoise.readthedocs.io/en/latest/
Django admin templates: https://github.com/django/django/tree/main/django/contrib/admin/templates/admin
Procedure:
1: Install whitenoise support Django4.2 - 5.1
Update the middleware in the project settings
Proceed to the static make the following changes adding STATIC_ROOT and STATICFILES_STORAGE
2: The run
python manage.py collectstatic
3: Runserver
python manage.py runserver
Ensure you template folder doesn’t miss the html files:
💖 💪 🙅 🚩
ian-veteran
Posted on November 6, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.