How to see changes in django admin base.css
I want to change some css in static/admin/css/base.css
After some attempts I now fail to understand the static-file concept at all.
As a matter of fact I can delete the whole static directory without any effect/error (browser CTRL + F5).
# settings.py
STATIC_URL = "static/"
STATIC_ROOT = BASE_DIR.joinpath('static')
# urls.py
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL,
document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL,
document_root=settings.STATIC_ROOT)
Long story short; How to change base.css?
The way you do this is to have a file, custom of your own such as admin_custom.css, in the static folder, and in the templates folder, make an admin folder, with base_site.html inside it. Inside that base_site.html, edit it and put the <link> property of your own custom stylesheet in that file.