随笔分类 -  django错题本

摘要:在stackoverflow找到答案: (According to the official doc) In previous versions of Django, fixtures with forward references (i.e. relations to rows that have 阅读全文
posted @ 2019-04-19 16:37 梁少华 阅读(533) 评论(0) 推荐(0)
摘要:在stackoverflow找到了解决方案: To resolve this go to settings.py where there is new-style MIDDLEWARE (introduced in Django 1.10) Change that to old-style MIDD 阅读全文
posted @ 2019-04-19 15:52 梁少华 阅读(1258) 评论(0) 推荐(0)
摘要:在做文章归档的会后,打印结果时报了这个错误 原因是时区问题 解决方案 在mysql设置时区 修改django project下的settings.py中市区配置信息: USE_TZ是统一全球的时间,不夸时区的应用可以把这个设置为False 设置USE_TZ为True的显示格式 设置USE_TZ为Fl 阅读全文
posted @ 2019-02-16 18:57 梁少华 阅读(1210) 评论(0) 推荐(0)
摘要:在学习一对一查询的时候,打印作者的电话时报了这个错 经过排查后,发现是AuthorDetail这张表的日期的问题。当设置日期后,就如下图变成了一推数字。 把如期设置成null=True,并不设置日期,就暂时解决了这个问题,还不知道原理是什么,在接下来的学习中寻找更好的解决方案吧啊。 通过Pychar 阅读全文
posted @ 2019-01-29 16:43 梁少华 阅读(2303) 评论(0) 推荐(1)