I wrote a Django 2.2 program that works well in my PC running Windows 10 and my VPS, running CentOS 7.
When I changed some code in three files, the application continues to work locally but behaves strangely in prouduction.
When I run
python manage.py runserver 0.0.0.0:80
on my server, I get this following response:
***\a.py changed, reloading.
Watching for file changes with StatReloader
***\b.py changed, reloading.
Watching for file changes with StatReloader
***\c.py changed, reloading.
Watching for file changes with StatReloader
***\a.py changed, reloading.
Watching for file changes with StatReloader
***\b.py changed, reloading.
Watching for file changes with StatReloader
I modified these files before deploying, but they shouldn't be changing while the site is running.
Adding the --noreload
flag prevents this:
python manage.py runserver --noreload 0.0.0.0:80
Why is this required?