Django manage.py runserver never finishes “validating models”

拜拜、爱过 提交于 2019-12-08 08:48:24

问题


I am trying to follow the django tutorial. I am running on windows+eclipse. When I run python manage.py runserver I get the message Validating models... and afterwards see no progress...

Am I doing something wrong?


回答1:


I've got my answer in another question: can't get django to work in eclipse + windows

When I ran the server with the --noreload option, I saw that there's an exception thrown. After I fixed that, the output does complete, and says:

Validating models...
0 errors found

Django version 1.2.1, using settings 'XXX'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.



回答2:


The shell is running the runserver process, and it won't go back to a command prompt until the server process ends. So, this sounds normal.

Is the server functioning?




回答3:


You could possibly be importing something in your models.py file that is failing in another file. I had an import in a try/catch clause that caused this behavior. Installing the missing dependency fixed the problem.




回答4:


This is what you're supposed to see. If you make a request to your test site (via your browser), you will see the log of the request. If you don't see that, then something else is wrong.



来源:https://stackoverflow.com/questions/4167250/django-manage-py-runserver-never-finishes-validating-models

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!