By default, Django's runserver
command auto reloads the server when python or template files are changed.
Is it possible to configure Django to extend its file monitoring for this purpose to other directories or sets of files, such as JavaScript or CSS files being served statically (during development)?
This would be useful in this scenario: the Django app reads a set of static text files on startup and I would like the server to re-read them when they change, without having to add this specific feature - simply restarting would be fine.
Do I need to start meddling with (or extending) django/utils/autoreload.py
?
The static files are automatically served from disk, so there is no need to reload the dev server.
But your browser has it's own cache, and is keeping some of your static files in it... To reload it use this shortcut :
Ctrl + Shift + r OR Ctrl + f5
If your on mac use CMD button instead of ctrl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With