Django manage.py runserver never finishes “validat

2019-06-08 20:35发布

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?

4条回答
萌系小妹纸
2楼-- · 2019-06-08 21:01

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.

查看更多
混吃等死
3楼-- · 2019-06-08 21:13

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.

查看更多
贼婆χ
4楼-- · 2019-06-08 21:17

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?

查看更多
放荡不羁爱自由
5楼-- · 2019-06-08 21:21

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.
查看更多
登录 后发表回答