摘要:
转。。。。。。。。。。。。。。。。。。。。。。。。。。。。。五、数据库访问1、基本数据访问[root@pxe-svr mysite]# ./manage.py shell>>> from books.models import Publisher#导入Publisher模型类>>> p1 = Publisher(name='Apress', address='2855 Telegraph Avenue', city='Berkeley', state_province='CA', country 阅读全文
posted @ 2012-12-24 16:24
事件轮询,回不到过去
阅读(4119)
评论(0)
推荐(0)
摘要:
coercing to Unicode: need string or buffer, datetime.datetime foundcoercing to Unicode: need string or buffer, int found在models中,__unicode__(self) return self.datetime ------> return "%s" % self.datetime return self.int ---------->return "%d" % self.intdef __unicode__(self) 阅读全文
posted @ 2012-12-24 16:22
事件轮询,回不到过去
阅读(3226)
评论(0)
推荐(1)