MultipleObjectsReturned
在页面上新建一个article,数据库中有记录了,在页面再次点开的时候(如图所示,点击Title_1),报如下错误,这是什么原因。
MultipleObjectsReturned at /admin/blog/article/1/change/
get() returned more than one Article -- it returned 2!
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/blog/article/1/change/
Django Version: 1.10.6
Exception Type: MultipleObjectsReturned
Exception Value:
get() returned more than one Article -- it returned 2!
Exception Location: D:\python\python\lib\site-packages\django\db\models\query.py in get, line 389
Python Executable: D:\python\python\python.exe
Python Version: 2.7.13
Python Path:
['D:\\python\\colin\\Dj',
'D:\\python\\colin\\Dj',
'D:\\python\\python\\DLLs',
'D:\\python\\python\\lib',
'D:\\python\\python\\lib\\lib-tk',
'D:\\python\\python',
'D:\\python\\python\\lib\\site-packages',
'C:\\windows\\system32\\python27.zip',
'D:\\python\\python\\lib\\plat-win']