Django报错
萧水雨寒
这个作者很懒,什么都没留下…
展开
-
解决Error: You must either define the environment variable DJANGO_SETTINGS_MODULE ...的问题
问题描述:使用pycharm开发django项目,启动manage.py 测试时,会出现如下问题:Error: You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings解决方法:根据提示,有两种解决方法:1、define the environment variable DJANGO_SETTIN原创 2020-09-05 15:54:48 · 7099 阅读 · 1 评论 -
解决django集成swagger报错TypeError at /docs/ Expected a `coreapi.Document` instance 的问题
TypeError at /docs/Expected a `coreapi.Document` instance原创 2020-09-05 14:54:15 · 912 阅读 · 0 评论 -
Django迁移mysql执行命令报错——AttributeError: ‘str‘ object has no attribute ‘decode‘
问题描述:Django迁移mysql——执行命令python manage.py makemigrations api 时报错,报错信息:AttributeError: 'str' object has no attribute 'decode'E:\django_restful>python manage.py makemigrations apiTraceback (most recent call last): File "manage.py", line 21, in <.原创 2020-08-16 11:22:44 · 1272 阅读 · 4 评论 -
pymysql.err.OperationalError: (1045, “Access denied for user ‘root‘@‘localhost‘ (using password: NO)
问题描述:Django迁移mysql——执行命令python manage.py makemigrations api 时报错,报错信息:pymysql.err.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: NO)")django.db.utils.OperationalError: (1045, "Access denied for user 'root'@'localhos原创 2020-08-16 11:05:33 · 8297 阅读 · 0 评论