上一页 1 ··· 4 5 6 7 8 9 10 下一页
摘要: F12 开发者控制台 ctrl+shift+P 在输入Capture full size screeshot 可以对网页进行长截图 阅读全文
posted @ 2020-03-03 15:32 y0um 阅读(557) 评论(0) 推荐(0) 编辑
摘要: cd /etc/yum.repo.d/ mkdir allbak mv * allbak/ wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 阅读全文
posted @ 2020-03-03 12:44 y0um 阅读(168) 评论(0) 推荐(0) 编辑
摘要: pip install pycryptodome 阅读全文
posted @ 2020-03-03 10:45 y0um 阅读(3351) 评论(0) 推荐(0) 编辑
摘要: windows环境 安装virtualenv,创建python虚拟环境。 1) (有就不用安装)安装virtualenv : pip install virtualenv //virtualenv –version 检查是否正确安装。2) 创建python 虚拟环境:virtualenv venv 阅读全文
posted @ 2020-03-02 20:46 y0um 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 概要 and 逻辑与运算,等价于数学中的“且” a and b 当 a 和 b 两个表达式都为真时,a and b 的结果才为真,否则为假。 or 逻辑或运算,等价于数学中的“或” a or b 当 a 和 b 两个表达式都为假时,a or b 的结果才是假,否则为真。 not 逻辑非运算,等价于数 阅读全文
posted @ 2020-03-02 12:44 y0um 阅读(220) 评论(0) 推荐(0) 编辑
摘要: from django.db import models '''contenttype使用意义:如果使用contenttypes就不需要再使用多个Foreignkey, 因为在django_content_type表已经存储了app名和model名, 所以我们只需要将我们创建的模型与django_c 阅读全文
posted @ 2020-02-23 12:56 y0um 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 文章参考博主:https://www.cnblogs.com/li-li/p/10103918.html 1.url注册器组件 : 通过DRF的视图组件,数据接口逻辑被我们优化到最后剩下一个类,接下来,我们使用DRF的url控制器来帮助我们自动生成url '''3.使用url注册器组件的url''' 阅读全文
posted @ 2020-02-22 11:18 y0um 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1.频率组件 在项目应用目录创建ratethrottle_classes.py文件,get_cache_key是必须存在的,它的返回值告诉当前频率控制组件要使用什么方式区分访问者(比如ip地址) (局部使用) # 导入模块 from rest_framework.throttling import 阅读全文
posted @ 2020-02-22 10:47 y0um 阅读(184) 评论(0) 推荐(0) 编辑
摘要: from rest_framework.viewsets import ModelViewSet from .authentication_classes import UserAuth from .permission_classes import UserPerm class BookView( 阅读全文
posted @ 2020-02-21 21:01 y0um 阅读(134) 评论(0) 推荐(0) 编辑
摘要: '''用户认证章节''' # 用户认证章节:写一个数据接口 from django.http import JsonResponse from .utils import get_token from rest_framework.exceptions import APIException cla 阅读全文
posted @ 2020-02-21 19:36 y0um 阅读(161) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 下一页

新人优惠服务器