spent hours trying to figure out what I was doing wrong! Switched debug = True, and Vrroom! Thanks!!
Changing debug to True is fixing a symptom and not the real problem. If this is something you want to fix, please open a new topic for your issue and weâll work on helping you getting it resolved.
The solution to this issue for me is detailed here Serving static files during development.
Just add this to your urls.py:
from django.conf import settings
from django.conf.urls.static import staticurlpatterns = [
# ⌠the rest of your URLconf goes here âŚ
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
This might be fine in a development environment, but itâs exactly what you donât want to do for a production-quality deployment.
Thanks Ken for spotting this. Indeed, as per documentation, itâs not production-quality. I managed to fix it by identifying in the logs (i.e. /var/log/nginx/error.log) where the server was trying to call the Django Admin static assets. It seems like the fix to this issue can be narrowed down to the path of where the server is calling the admin assets. Upon trying it out locally on runserver, it all works, but when I deploy to AWS ElasticBeanstalk, it seems like it wasnât pointing to the correct static folder where the assets were in.
So in order to fix this, check your error logs and see where the server is pointing to the admin assets (most likely that folder doesnât exist), and therefore try to change it in different settings. By âdifferent settingsâ, this could be your Server/Cloud providers configuration files (that map that static folder built locally to the static folder in the server) or perhaps the Django STATIC_ROOT variable.
All you have to do is ctrl+shift+R on the admin page. Itâs just a cache issue.
Hi
i have same issue, before upgrade everything is fine :
debug log for version 4.1.3:
HTTP GET /static/admin/css/base.css 200 [0.00, 127.0.0.1:36220]
HTTP GET /static/admin/css/nav_sidebar.css 200 [0.03, 127.0.0.1:36220]
HTTP GET /adminimi/login/?next=/adminimi/auth/user/ 200 [0.03, 127.0.0.1:36252]
HTTP GET /static/admin/css/base.css 200 [0.01, 127.0.0.1:36252]
HTTP GET /static/admin/css/dark_mode.css 200 [0.01, 127.0.0.1:36258]
HTTP GET /static/admin/css/nav_sidebar.css 200 [0.02, 127.0.0.1:36262]
HTTP GET /static/admin/js/nav_sidebar.js 200 [0.02, 127.0.0.1:36276]
HTTP GET /static/admin/css/login.css 200 [0.03, 127.0.0.1:36284]
HTTP GET /static/admin/css/responsive.css 200 [0.03, 127.0.0.1:36300]
HTTP GET /static/admin/css/fonts.css 200 [0.03, 127.0.0.1:36252]
HTTP GET /static/admin/fonts/Roboto-Regular-webfont.woff 200 [0.00, 127.0.0.1:36300]
HTTP GET /static/admin/fonts/Roboto-Light-webfont.woff 200 [0.01, 127.0.0.1:36276]
after upgrade to 4.2.7 :
HTTP GET /static/admin/css/base.css 200 [0.04, 127.0.0.1:54078]
HTTP GET /static/admin/css/nav_sidebar.css 200 [0.04, 127.0.0.1:54092]
HTTP GET /static/admin/js/theme.js 200 [0.04, 127.0.0.1:54100]
HTTP GET /static/admin/css/dark_mode.css 200 [0.05, 127.0.0.1:54106]
HTTP GET /static/admin/css/login.css 200 [0.06, 127.0.0.1:54114]
HTTP GET /static/admin/js/nav_sidebar.js 200 [0.07, 127.0.0.1:54124]
HTTP GET /static/admin/css/responsive.css 500 [0.33, 127.0.0.1:54078]
HTTP GET /static/admin/css/fonts.css 500 [0.33, 127.0.0.1:54092]
two css files have 500 error .
If this is something with which you would like assistance, please open a new topic for this. Include in your post a description of your environment (what operating system, what versions of Django and Python, what server youâre running, and how youâre running it).
Also, please identify what log this is that you are displaying here.
If this is something with which you would like assistance, please open a new topic for this. Include in your post a description of your environment (what operating system, what versions of Django and Python, what server youâre running, and how youâre running it).
Include identifying whether this is a new installation or an upgrade, and what you have tried so far to resolve this.