python manage.py runserver keeps reloading stating file has changed

Question:

I’ve been working on a django project with no issues. I’ve pulled updated code from the remote repository and now if i do python manage.py runserver in cmd, i keep getting error

Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
D:some_projectsomeappschemesmodels.py changed, reloading.
Watching for file changes with StatReloader
Performing system checks...

then

Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
D:some_projectsomeappschemesviews.py changed, reloading.
Watching for file changes with StatReloader
Performing system checks...

it keeps looping through all the files and all the apps that have in my django project.
it works if i try python manage.py runserver --noreload however, i’m curious as to what lead to the issue in the first place.

Asked By: Irfan Harun

||

Answers:

You may be experiencing this issue due to your development environment. If you are using a Vagrant server or similar, the reloading of the files would be due to the Vagrant server refreshing the files from your local machine.

The --noreload flag is suitable for situations like this.

Answered By: JP Siv-Wri

I just restart the server and VScode then it’s worked for me.

Answered By: Saad Zahid Qureshi
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.