【发布时间】:2012-07-23 01:31:31
【问题描述】:
我试图在sqlite数据库中使用一些汉字(用django),但无法在管理页面中显示
来自setting.py:
LANGUAGE_CODE = 'en'
gettext = lambda s: s
LANGUAGES = (
('zh-cn', gettext('Simplified Chinese')),
('en', gettext('English')),
)
来自models.py:*的汉字
# -*- coding: cp936 -*-
class jiu(models.Model):
unit_list = (
('***', '***'),
('***', '***'),
)
unit = models.CharField(max_length=8, choices=unit_list)
这是一个 sqlite3 数据库开发服务器。
【问题讨论】:
-
好的...我解决了...只需使用 u'***'
标签: database django utf-8 sqlite