Re: [問題] Django新手 runserver失敗
這是我的資料夾結構
mysite/
manage.py
db.sqlite3
mysite/
__init__.py
settings.py
urls.py
wsgi.py
__pycache__/
__init__.cpython-34.pyc
settings.cpython-34.pyc
urls.cpython-34.pyc
wsgi.cpython-34.pyc
polls/
__init__.py
admin.py
apps.py
migrations/
__init__.py
models.py
tests.py
views.py
我把polls 移往下一層(mysite內)執行後
----cmd 顯示----
(myvenv) C:\Users\peng\Django>python .\mysite\manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
June 18, 2017 - 19:38:53
Django version 1.11.2, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
-----瀏覽器顯示----
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in
this order:
^polls/
^admin/
The empty path didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a standard 404
page.
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.167.50.89
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1497786964.A.94A.html
推
06/18 20:16, , 1F
06/18 20:16, 1F
→
06/18 20:16, , 2F
06/18 20:16, 2F
→
06/18 20:19, , 3F
06/18 20:19, 3F
→
06/18 20:20, , 4F
06/18 20:20, 4F
→
06/18 20:21, , 5F
06/18 20:21, 5F
→
06/18 20:32, , 6F
06/18 20:32, 6F
→
06/18 20:43, , 7F
06/18 20:43, 7F
→
06/18 20:44, , 8F
06/18 20:44, 8F
→
06/18 20:45, , 9F
06/18 20:45, 9F
→
06/18 21:00, , 10F
06/18 21:00, 10F
→
06/18 21:01, , 11F
06/18 21:01, 11F
→
06/18 21:27, , 12F
06/18 21:27, 12F
→
06/18 21:33, , 13F
06/18 21:33, 13F
→
06/18 21:33, , 14F
06/18 21:33, 14F
→
06/18 21:40, , 15F
06/18 21:40, 15F
推
06/18 22:05, , 16F
06/18 22:05, 16F
→
06/18 22:05, , 17F
06/18 22:05, 17F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):