上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 26 下一页
摘要: 1.1在celery_task/mian.py 中添加发送短信函数 # celery项目中的所有导包地址, 都是以CELERY_BASE_DIR为基准设定. # 执行celery命令时, 也需要进入CELERY_BASE_DIR目录执行. # -*- coding: utf-8 -*- import 阅读全文
posted @ 2020-11-04 20:12 小虾米爱吃鱼 阅读(109) 评论(0) 推荐(0)
摘要: 配置settings.py # 缓存配置 CACHES ={ # django存缓默认位置,redis 0号库 # default: 连接名称 "default": { "BACKEND": "django_redis.cache.RedisCache", "LOCATION": "redis:// 阅读全文
posted @ 2020-11-03 21:35 小虾米爱吃鱼 阅读(121) 评论(0) 推荐(0)
摘要: 封装axios 1.1 创建src/http 文件夹 用来放网络请求相关的文件 1.2src/http/index.js 文件夹下, 创建 index.js 文件, 对axios进行封装 /* eslint-disable */ // 第一步:实例化axios对象,简单封装 const axios 阅读全文
posted @ 2020-10-30 11:56 小虾米爱吃鱼 阅读(1434) 评论(0) 推荐(0)
摘要: 1.图书管理系统后端接口 1.1books/models.py 中设置表 from django.db import models class Books(models.Model): btitle = models.CharField(max_length=20) bpub_date = mode 阅读全文
posted @ 2020-10-30 07:50 小虾米爱吃鱼 阅读(73) 评论(0) 推荐(0)
摘要: 1.1 Meta源信息 from django.db import models # Create your models here. class Cls(models.Model): title=models.CharField(max_length=100) class UserInfo(mod 阅读全文
posted @ 2020-10-29 07:44 小虾米爱吃鱼 阅读(140) 评论(0) 推荐(0)
摘要: 1.一对多的基本增删改查操作 from django.db import models class UserType(models.Model): type_name = models.CharField(max_length=64, unique=True) class UserInfo(mode 阅读全文
posted @ 2020-10-29 07:35 小虾米爱吃鱼 阅读(198) 评论(0) 推荐(0)
摘要: 1.user/models.py 表数据 from django.db import models from django.contrib.auth.models import AbstractUser # Create your models here. class User(AbstractUs 阅读全文
posted @ 2020-10-28 15:02 小虾米爱吃鱼 阅读(251) 评论(0) 推荐(0)
摘要: 1.1安装DjangoRestFramework pip install djangorestframework==3.11.1 pip install django-filter==2.3.0 pip install markdown 1.2.syl/settings.py配置 INSTALLED 阅读全文
posted @ 2020-10-28 07:42 小虾米爱吃鱼 阅读(138) 评论(0) 推荐(0)
摘要: 位于syl/settings 1.1操作系统文件绝对路径 import osprint(os.path.abspath(__file__)) #/root/day/day08/syl/syl/settings.py print(os.path.dirname(os.path.abspath(__fi 阅读全文
posted @ 2020-10-27 15:53 小虾米爱吃鱼 阅读(85) 评论(0) 推荐(0)
摘要: 创建虚拟环境 mkvirtualenv 虚拟环境名称 查询拥有虚拟环境 workon 退出虚拟环境 deactivate 删除虚拟环境 rmvirtualenv 虚拟环境名称 把所有安装包都导入到这个txt里 pip freeze>requirements.txt 下载之前所有安装包 pip ins 阅读全文
posted @ 2020-10-26 19:56 小虾米爱吃鱼 阅读(68) 评论(0) 推荐(0)
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 26 下一页