The current path, page/, didn't match any of these


最近在學習python,按照網上的步驟進行操作

url.py的代碼

 

 

 

但是一直報如下的錯。

Page not found (404)

Request Method: GET
Request URL: http://127.0.0.1:8000/page/

Using the URLconf defined in HelloWorld.urls, Django tried these URL patterns, in this order:

  1. ^page$

The current path, page/, 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.

 

百度了很多,最后發現是上述代碼中有一個問題,

 

 

 

之后就可以訪問了

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM