fushuanglin

#

[置顶] linux'基础

摘要: https://m.luffycity.com/linux-book/Linux基础/Linux云计算运维工程师.html 一:dell服务器 二:buffer和cache的区别 写入(缓冲区) 数据-->内存(buffer)-->磁盘 读取(缓存区) 读取<--内存(cache)<--磁盘 三:解 阅读全文

posted @ 2020-09-27 22:05 fushuanglin 阅读(67) 评论(0) 推荐(0) 编辑

2018年12月19日 #

cvb源码分析,resful规范,drf,drf序列化组件,95

摘要: 1 CBV的源码分析 -Class Base View(基于类的视图) -Function Base View(基于函数的视图) -def as_view 类方法 -def view:类方法内部,闭包函数定义:内层函数包含对外部作用域的引用 -python中一切皆对象:函数也是对象 -hasattr 阅读全文

posted @ 2018-12-19 09:36 fushuanglin 阅读(223) 评论(3) 推荐(0) 编辑

2018年12月13日 #

rest_framework登录组件,权限组件

摘要: 昨日回顾: -HyperlinkedIdentityField(用来生成url),传三个参数 -实例化序列化类的时候,BookSerializer(ret, many=True, context={'request': request}) -序列化组件的数据校验 -类比forms组件 -局部(val 阅读全文

posted @ 2018-12-13 20:58 fushuanglin 阅读(144) 评论(0) 推荐(0) 编辑

2018年11月28日 #

forms组件

摘要: 昨日回顾: 批量插入数据: -queryset的方法:bulk_create(对象列表,数字(一次插入多少)) 分页器: from django.core.paginator import Paginator book_list=models.Book.objeces.all() pageinato 阅读全文

posted @ 2018-11-28 18:34 fushuanglin 阅读(115) 评论(0) 推荐(0) 编辑

分页器

摘要: 昨日回顾: 1 ajax 什么是ajax:异步的JavaScript 和xml 2 特点:异步,局部刷新 3 简单的与后台交互:(携带数据:可以拼到url上 >从GET中取,) $.ajax({ url:请求的地址, type:请求方式,(post,get....) //contentType:'a 阅读全文

posted @ 2018-11-28 18:33 fushuanglin 阅读(172) 评论(0) 推荐(0) 编辑

基于ajax提交数据

摘要: 昨日回顾: 1 inclusion_tag -干什么用的?生成html的片段(动态,传参数,传数据) -app下新建一个模块,templatetags -创建一个py文件(mytag.py) -from django.template import Library -register=Library 阅读全文

posted @ 2018-11-28 18:31 fushuanglin 阅读(329) 评论(0) 推荐(0) 编辑

回顾django内容

摘要: 回顾: 1 HTTP协议:(重点) -请求 -请求首行 -GET /index HTTP/1.1 -请求头部(在django框架中,可以从META中取出来) -key:value >\r\n分割 -请求体(post请求发的数据) \r\n\r\n -往后台传数据的时候,有编码方式(urlencode 阅读全文

posted @ 2018-11-28 17:33 fushuanglin 阅读(133) 评论(0) 推荐(0) 编辑

多表操作

摘要: 昨日回顾: 1 模板导入 -写一个模板 -{%include '模板名字'%} 2 母版继承 -写一个母版(留几个盒子),名字叫XX -{% block 名字 %} {%endblock%} -使用:继承母版 -{%extends 'XX'%} -重写盒子(多个盒子,位置无关) -{% block 阅读全文

posted @ 2018-11-28 17:29 fushuanglin 阅读(101) 评论(0) 推荐(0) 编辑

路由层

摘要: 昨日回顾 1 orm 创建表,新增字段,修改,删除字段,不能创建数据库 -字段属性phone=models.CharField(max_length=64,null=True) -null=True 代表该列可以为空 2 数据的增删改查 -增(1):User.objects.create(addre 阅读全文

posted @ 2018-11-28 17:18 fushuanglin 阅读(127) 评论(0) 推荐(0) 编辑

orm介绍

摘要: 昨日回顾: 1 今日内容: 1 orm介绍 1 tools >Run manage.py Task python3 manage.py makemigrations 只需要敲命令:makemigrations(记录数据库的修改记录) python3 manage.py migrate 只需要敲命令: 阅读全文

posted @ 2018-11-28 17:17 fushuanglin 阅读(142) 评论(0) 推荐(0) 编辑

导航