I've just created new Python 3.7 virtualenv with Django 2.2
And each runserver
it prints:
Watching for file changes with StatReloader
I could not find any info in Django's docs etc.
Is it related specially to Django somehow? Does it go with Django? What it does? Why is it printed in red in PyCharm? Should I be careful about something? Could it be disabled?
Big thx
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.
(Runserver docs)
No idea why its in red in pycharm but if you really wanted to you can disable it with the --noreload
flag
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
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