1 2 3 4 5 ··· 7 下一页
摘要: 1 .windows安装 1 windows安装(不建议你装)http://get.daocloud.io/ 2.乌班图 # 0 卸载 sudo apt-get remove docker docker-engine docker.io containerd runc # 1 安装必要工具 sudo 阅读全文
posted @ 2022-05-08 18:31 recordlife 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 目录内容 shoppingmall/ ├── docs/ # 项目相关资料保存目录 ├── shopingmallcity/ # 前端项目目录 ├── shoppingmallapi/ # 后端项目目录 ├── logs/ # 项目运行时/开发时日志目录 ├── manage.py ├── shop 阅读全文
posted @ 2022-05-05 20:30 recordlife 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 删除应用中migrations文件中除__init__.py文件的文件 进入url.py文件中,点击admin,找到auth和admin文件删除migrations文件中除__init__.py文件的文件 阅读全文
posted @ 2022-05-05 19:27 recordlife 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 配置在环境变量中 pwd = os.environ.get('password', '123js') 配置中心 pwd = request.get().json()['password'] 阅读全文
posted @ 2022-04-26 18:19 recordlife 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 创建应用 python ../../manage.py startapp user 在配置文件中注册应用 INSTALLED_APPS = ['user'] 在models.py中,创建user表 from django.db import models from django.contrib.au 阅读全文
posted @ 2022-04-26 16:58 recordlife 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 创建一个数据库 # 创建数据库,并配置 -create database book default charset=utf8; 查看用户 # 5.7之前版本 select user,host,password from mysql.user; # 5.7往后的版本 select user,host, 阅读全文
posted @ 2022-04-26 16:30 recordlife 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 在utils文件下面新建response文件 from rest_framework.response import Response class APIResponse(Response): def __init__(self, status=100, msg='成功', http_status= 阅读全文
posted @ 2022-04-26 14:36 recordlife 阅读(75) 评论(0) 推荐(0) 编辑
摘要: dev.py文件中配置以下内容 REST_FRAMEWORK = { 'EXCEPTION_HANDLER': 'utils.exception.common_exception_handler' # 再出异常,会执行这个函数 } 在utils文件夹下新建excepiton.py ## 全局异常捕获 阅读全文
posted @ 2022-04-26 13:57 recordlife 阅读(53) 评论(0) 推荐(0) 编辑
摘要: python ../../manage.py startapp user 阅读全文
posted @ 2022-04-26 12:55 recordlife 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 配置文件的配置(filename的路径要改) LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': '%(levelname)s %(asctime)s 阅读全文
posted @ 2022-04-26 12:54 recordlife 阅读(176) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 7 下一页