Django的bug
user_san
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module. Did you install mysqlclie
解决办法一: 1、安装pymysql pip install pymysql 2、在根目录的__init__.py文件里加下面两行代码: import pymysql pymysql.install_as_MySQLdb()原创 2021-10-15 10:57:48 · 644 阅读 · 1 评论 -
django.core.exceptions.ImproperlyConfigured: Requested setting EMAIL_FROM, but settings are not conf
报错信息: django.core.exceptions.ImproperlyConfigured: Requested setting EMAIL_FROM, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. 原因: 我们在运行异步任务的原创 2020-10-26 17:15:40 · 506 阅读 · 0 评论 -
TypeError: In order to allow non-dict objects to be serialized set the safe parameter to False.
生成图片验证码的时候,函数返回的时候使用HttpResponse,而不用JsonResponse原创 2020-10-19 08:38:44 · 1463 阅读 · 0 评论 -
Django运行工程的时候报错AttributeError: ‘str‘ object has no attribute ‘decode‘
解决:把源码的decode改成encode原创 2020-10-18 16:46:13 · 293 阅读 · 0 评论
分享