运行是页面报错“__init__() takes 1 positional argument but 2 were given”
TypeError at /index/
__init__() takes 1 positional argument but 2 were given
Request Method:
GET
Request URL:
http://127.0.0.1:8000/index/
Django Version:
1.11.2
Exception Type:
TypeError
Exception Value:
__init__() takes 1 positional argument but 2 were given
Exception Location:
C:\lijin\PY\djangotest\Dtest\views.py in index, line 5
Python Executable:
C:\Users\0\AppData\Local\Programs\Python\Python36\python.exe
Python Version:
3.6.1
Python Path:
['C:\\lijin\\PY\\djangotest',
'C:\\lijin\\PY\\djangotest',
'C:\\Users\\0\\AppData\\Local\\Programs\\Python\\Python36\\python36.zip',
'C:\\Users\\0\\AppData\\Local\\Programs\\Python\\Python36\\DLLs',
'C:\\Users\\0\\AppData\\Local\\Programs\\Python\\Python36\\lib',
'C:\\Users\\0\\AppData\\Local\\Programs\\Python\\Python36',
'C:\\Users\\0\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages']
Server time:
Thu, 29 Jun 2017 05:53:05 +0000