摘要:
不要导入该APP的包,而是加上双引号写入"App.xxx" 阅读全文
Requested setting INSTALLED_APPS, but settings are not configured. You must either define the env...
摘要:
解决办法 在test.py文件的最头部加上以下代码,配置环境 import os,django os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djbbs.settings') django.setup() 阅读全文
摘要:
这个问题是在使用 django REST 做自定义认证的时候出现的 解决方法是 在settings.py 中注释掉这个 REST_FRAMEWORK={ 'DEFAULT_PERMISSION_CLASSES': [ 'rest_framework.permissions.DjangoModelPe 阅读全文
AssertionError: Expected a `Response`, `HttpResponse` or `HttpStreamingResponse` to be returned from
摘要:
函数里面return response问题: 1、没有 2、写错 3、位置错 例如: return Response('确认成功') 阅读全文
摘要:
strftime是转换为特定格式输出, strptime是将一个时间字符串解析为时间类型对象。 strftime是按照想要的格式,去转换。重点是格式! strptime不管什么格式,只要把特定的时间字符串转成时间类型即可! 阅读全文
摘要:
错误原因是你的项目使用的不是Django自带的用户表,采用的自定义的用户表,这个时候需要在settings.py里面进行指定。 AUTH_USER_MODEL = 'usersApp.UserProfile' # usersApp是app名,UserProfile是models中的类名 阅读全文
摘要:
Can't uninstall 'Pillow'. No files were found to uninstall. Pillow卸载不掉的解决办法 1、进入python所在路径,进入scripts文件夹 2、执行pip uninstall Pillow卸载 阅读全文
摘要:
pip常用命令:bundle,创建包含多个包的pybundles; freeze,显示所有已安装的包; help,显示可用命令; install,安装包; search,搜索PyPi; uninstall,卸载包; unzip,解压缩单个包; zip,压缩单个包。安装: pip3 install n 阅读全文
摘要:
https://gitee.com/panjiachen/vue-admin-template/ https://github.com/PanJiaChen/vue-admin-template 阅读全文
摘要:
修改前: "vue/max-attributes-per-line": [2, { "singleline": 10, "multiline": { "max": 1, "allowFirstLine": false } } 修改后: "vue/max-attributes-per-line": [ 阅读全文