Caught TypeError while rendering: coercing to Unicode:解决方法
来源:互联网 发布:张亮 从零开始 知乎 编辑:程序博客网 时间:2024/05/17 08:39
今天出了个比较麻烦的方法”Caught TypeError while rendering: coercing to Unicode:“
找了半天发现是个低级错误,就是django中不能显示对象,必须取对象的属性所为显示。改下就行了
def __unicode__(self):
return self.UserID
class Admin():
sort_fields=["UserID"]
其中UserID是外键,必须改为UserID.name之类的就是正确的了
- Caught TypeError while rendering: coercing to Unicode:解决方法
- Caught TypeError while rendering: coercing to Unicode: need string or buffer, NoneType found
- [Quixote]上传时错误TypeError: coercing to Unicode: need string or buffer, htmltext found
- Python TypeError: coercing to Unicode: need string or buffer, float found
- coercing to Unicode错误的一个解决办法
- django coercing to Unicode: need string or buffer, long found
- Caught an exception while rendering: (1146, "Table 'django.django_admin_log' doesn't exist")
- Django笔记 ”coercing to Unicode: need string or buffer, int found“
- python字符串和变量相加时出现,coercing to unicode need string or buffer nonetype found python 错误的解决
- python字符串和变量相加时出现,coercing to unicode need string or buffer ?? found 错误的解决
- Caught exception while loading file struts-default
- Caught OgnlException while setting property 'min
- While reading XXX pngcrush caught libpng error
- While reading XXX pngcrush caught libpng error:
- While checking XXX pngcrush caught libpng error:
- TypeError: unicode strings are not supported, please encode to bytes: 'hu'
- XCode编译:pngcrush caught libpng error解决方法
- Xcode编译: pngcrush caught libpng error解决方法
- vsFTPd 服务器初学者指南
- 【Android】屏幕适配
- vc++ 批量读取和存储文件
- 你能说出SQL聚集索引和非聚集索引的区别吗?
- 程序设计竞赛网站集锦
- Caught TypeError while rendering: coercing to Unicode:解决方法
- 学习笔记之Dom_02
- 这是第一篇文章
- SQL Server:查询当前服务器有多少连接请求
- FCKeditor(FCK)上传漏洞利用原理详解
- win7(64)未在本地计算机上注册 Microsoft.Jet.OLEDB.4.0 提供程序
- 泛型概述
- 将ipone项目转到ipad平台以及开发同时支持这两个平台的项目
- Int32.Parse, Convert.ToInt32,Int32.TryParse三者的区别