Stuck in Watching for file changes with StatReloader

Viewed 7496

I made my project fine and when I run my server through a normal shell it works but I am trying to run my project through git bash. All the commands seem to work fine but when I do python manage.py runserver it gets stuck on Watching for file changes with StatReloader. Apparently after that I go to localhost:8000

but that and my 127 port 8000 are not responding and show that theres nothing there, No errors or anything and like I said if I python manage.py runserver through shell it works

4 Answers

If you use django with Dockerfile, you won't miss that env var PYTHONUNBUFFERED set by 1.

You may be missing the port binding, try to run python manage.py runserver 0.0.0.0:8000 to be sure that the app is running on localhost:8000

Using Git Bash run:

$ python manage.py runserver 127.0.0.1:8000

In my case, it showed the same behavior ('Stuck in watching...'). However, after that I opened a browser and I typed:

127.0.01:8000. The Django webpage works properly.

Probably autoreload does not work well in your environment, if you don't need it - better turn it off by starting django with --noreload arg.

Related