我在python中运行的第一台服务器中的服务器错误

时间:2019-04-07 17:15:41

标签: python django web

我刚刚开始学习python Django,当我运行服务器时,它向我显示找不到页面。我继续包括我的索引页,它显示了属性错误(“ str”对象没有属性“ get”)

Page not found (404)
Request Method: GET
Request URL:    http://127.0.0.1:8000/
Using the URLconf defined in pybop.urls, Django tried these URL patterns, in this order:

admin/
products/
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.



AttributeError at /products/
'str' object has no attribute 'get'
Request Method: GET
Request URL:    http://127.0.0.1:8000/products/
Django Version: 2.2
Exception Type: AttributeError
Exception Value:    
'str' object has no attribute 'get'
Exception Location: C:\Users\Ishaku Danladi\PycharmProjects\pydop\venv\lib\site-packages\django\middleware\clickjacking.py in process_response, line 26
Python Executable:  C:\Users\Ishaku Danladi\PycharmProjects\pydop\venv\Scripts\python.exe
Python Version: 3.7.2
Python Path:    
['C:\\Users\\Ishaku Danladi\\PycharmProjects\\pydop',
 'C:\\Users\\Ishaku '
 'Danladi\\AppData\\Local\\Programs\\Python\\Python37\\python37.zip',
 'C:\\Users\\Ishaku Danladi\\AppData\\Local\\Programs\\Python\\Python37\\DLLs',
 'C:\\Users\\Ishaku Danladi\\AppData\\Local\\Programs\\Python\\Python37\\lib',
 'C:\\Users\\Ishaku Danladi\\AppData\\Local\\Programs\\Python\\Python37',
 'C:\\Users\\Ishaku Danladi\\PycharmProjects\\pydop\\venv',
 'C:\\Users\\Ishaku Danladi\\PycharmProjects\\pydop\\venv\\lib\\site-packages',
 'C:\\Users\\Ishaku '
 'Danladi\\PycharmProjects\\pydop\\venv\\lib\\site-packages\\setuptools-40.8.0-py3.7.egg',
 'C:\\Users\\Ishaku '
 'Danladi\\PycharmProjects\\pydop\\venv\\lib\\site-packages\\pip-19.0.3-py3.7.egg']
Server time:    Sun, 7 Apr 2019 17:10:12 +0000

0 个答案:

没有答案