28👍
Its the class that django uses to auto reload the development server whenever you make code changes .
Specifically, determined within the get_reloader
method where watchman is an alternative for linux / macOS
If you’re using Linux or MacOS and install both pywatchman and the Watchman service, kernel signals will be used to autoreload the server (rather than polling file modification timestamps each second). This offers better performance on large projects, reduced response time after code changes, more robust change detection, and a reduction in power usage.
No idea why its in red in pycharm but if you really wanted to you can disable it with the --noreload
flag
8👍
in my case, I changed the option DEBUG= True for DEBUG=False in my file settings.py
, since then its working.
before in settings.py
:
#SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
in docker :
$ docker run container_name
Watching for file changes with StatReloader
after in settings.py
:
#SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
in docker:
$ docker run container_name
[24/Mar/2020 10:10:19] "GET /health HTTP/1.1" 200 5299
- [Django]-How to disable Django's CSRF validation?
- [Django]-Table thumbnail_kvstore doesn't exist
- [Django]-How does the get_or_create function in Django return two values?
5👍
Use --noreload
flag when running the development server
python manage.py runserver 0.0.0.0:8000 --noreload
Reference is here.
- [Django]-Django models avoid duplicates
- [Django]-Django's timezone.now does not show the right time
- [Django]-Django Admin: OneToOne Relation as an Inline?
0👍
the main function of statreloader is to automatically update your site by changing a file of your django project, and you won’t need to run the command again.
- [Django]-What's the best way to migrate a Django DB from SQLite to MySQL?
- [Django]-Django: signal when user logs in?
- [Django]-Unable to connect to server: PgAdmin 4