前提・実現したいこと
ここに質問の内容を詳しく書いてください。
(例)PHP(CakePHP)で●●なシステムを作っています。
■■な機能を実装中に以下のエラーメッセージが発生しました。
発生している問題・エラーメッセージ
djangoのチュートリアルが上手くいきません。
https://docs.djangoproject.com/en/4.0/intro/tutorial01/
↑を参考にhttp://localhost:8000/polls/ に行きましたが
Page not found (404)
Request Method: GET
Request URL: http://localhost:8000/polls/
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
admin/
The current path, polls/, 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.
と表示されます
ターミナルでは
Not Found: /polls/ と出ています
該当のソースコード
python
mysite.urls で urlpatterns = [ path('polls/', include('polls.urls')), path('admin/', admin.site.urls), ] と書きました。
試したこと
・urlの文字列を変えてみました。
・ファイルを作る場所を確認しました。
補足情報(FW/ツールのバージョンなど)
python3.9.5
django4.0
まだ回答がついていません
会員登録して回答してみよう