jeudi 2 janvier 2020

CSS in django doesn't update

The problem that I have is not I fail to load css file, is that I can't update them. The first few times I edit after I have just created my css files, the changes were working. But after a while, when I try to change for example: the color, it is not changing. The colour on the web is not changing and I click to see the source file, it is using the unchanged version. I have also tried to use python manage.py collectstatic but still can't update the file.

# in settings.py 
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "static")
# in main urls.py 
if settings.DEBUG: 
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) 



Aucun commentaire:

Enregistrer un commentaire