TypeError at /admin/train/courseslist/add/
__str__ returned non-string (type Courses)
Request Method:
POST
Request URL:
http://127.0.0.1:8000/admin/train/courseslist/add/
Django Version:
2.0.5
Exception Type:
TypeError
Exception Value:
__str__ returned non-string (type Courses)
Exception Location:
D:\Python36\lib\site-packages\django\contrib\admin\options.py in log_addition, line 771
Python Executable:
D:\Python36\python.exe
Python Version:
3.6.3
Python Path:
['E:\\WorkPlace\\mysite',
'E:\\WorkPlace\\mysite',
'D:\\Python36\\python36.zip',
'D:\\Python36\\DLLs',
'D:\\Python36\\lib',
'D:\\Python36',
'D:\\Python36\\lib\\site-packages']
Server time:
Sun, 27 May 2018 00:05:56 +0000
处理: 删除models.py中对应的model的__str__函数。