Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django keeps restarting itself in development mode

Django development server keeps restarting itself, without any differences made to any files under the project directory.

Below is the output:

den@ev:~/calisma/ > python manage.py runserver 9000 -v 2 --traceback Validating models... 0 errors found

Django version 1.1.1, using settings 'myproject.settings' Development server is running at http://127.0.0.1:9000/ Quit the server with CONTROL-C. Validating models... 0 errors found

Django version 1.1.1, using settings 'myproject.settings' Development server is running at http://127.0.0.1:9000/ Quit the server with CONTROL-C. Validating models... 0 errors found

Django version 1.1.1, using settings 'myproject.settings' Development server is running at http://127.0.0.1:9000/ Quit the server with CONTROL-C. Validating models... 0 errors found

Django version 1.1.1, using settings 'myproject.settings' Development server is running at http://127.0.0.1:9000/ Quit the server with CONTROL-C.

^C

Most probably it does not like something somewhere in the project files but couldn't get it choke out what's wrong.

Any suggestions?

like image 359
altunyurt Avatar asked Sep 22 '10 10:09

altunyurt


2 Answers

  • Delete all the .pyc files
  • Use manage.py runserver --noreload
  • Try the same with an empty project. Or just disable all the INSTALLED_APPS setting.

How often does it reload? Inmediately, each X seconds, at random?

like image 135
David Arcos Avatar answered Sep 22 '22 01:09

David Arcos


First ensure that the date of your computer is correctly configured (up to date) if it is not update it then retry to run the server. If it still does not work I advise you to run the server with the option --noreload while waiting to find the solution but in my case that was exactly the same as the one meant set the date solved my problem.

like image 36
weird.ly Avatar answered Sep 19 '22 01:09

weird.ly