随笔分类 -  异常处理

开发过程中出现的一些莫名其妙的报错
摘要:class PricePolicyInvalid(Exception): def __init__(self, msg): self.msg = msg exception.py from app01.utils.exception import PricePolicyInvalid class T 阅读全文
posted @ 2020-04-15 09:58 aikell 阅读(85) 评论(0) 推荐(0)
摘要:表字段类型问题 publishDate=models.DateField() 改为 publishDate=models.DateTimeField() DateField是日期项,没法精确到时分秒。所以这里出现溢出错误。将 DateField改为 DateTimeField,重新初始化数据库以后问 阅读全文
posted @ 2020-02-26 17:49 aikell 阅读(3223) 评论(0) 推荐(0)
摘要:报错环境: python=3.7,django=2.2,PyMySQL=0.9.3 抛出异常: django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3. 阅读全文
posted @ 2020-02-15 14:38 aikell 阅读(723) 评论(0) 推荐(0)