2007年07月21日 星期六 12:24
我是看到说完全支持unicode才去更新SVN的结果发现还是有问题。 管理后台保存中文,出现出错页面。 加入管理页面,发现已经保存进去了。 再进编辑页面又挂了。 看出错信息是在转换成unicode的时候挂了,说我的字符不在0-128里面? 不知道是不是大家都有这个问题。 我的代码和数据库(mysql)都是用的UTF-8
2007年07月21日 星期六 15:24
我也遇到这样的问题
在 model 里面的写法类似这样的
class MyModel(models.Model):
name = CharField(maxlength=1024, unique=True)
def __str __(self):
return self.name
后来改成
class MyModel(models.Model):
name = CharField(maxlength=1024, unique=True)
def __unicode__(self):
return self.name
就好了
On 7/21/07, vicalloy <zbirder at gmail.com> wrote:
> 我是看到说完全支持unicode才去更新SVN的结果发现还是有问题。
> 管理后台保存中文,出现出错页面。
> 加入管理页面,发现已经保存进去了。
> 再进编辑页面又挂了。
> 看出错信息是在转换成unicode的时候挂了,说我的字符不在0-128里面?
> 不知道是不是大家都有这个问题。
>
> 我的代码和数据库(mysql)都是用的UTF-8
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
Zeuux © 2025
京ICP备05028076号