django __str__ returned non-string (type Courses)

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__函数。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值