摘要: django ORM数据的增删改查 一、模板语法分配变量 1.在urls.py中增加index的路由 2.view.py中定义函数方法,以及增加数据 from django.shortcuts import render​# Create your views here.​def index(req 阅读全文
posted @ 2021-08-11 22:51 Gnomeshghy 阅读(201) 评论(0) 推荐(0)
摘要: django三板斧 归档 1. 文件归档, 2. 时间归档 # 第一版, HttpResponse返回是字符串 # return HttpResponse('ok') # 第二版, 返回为html文件 # return render(requset, 'index.html') # 第三版, 返回一 阅读全文
posted @ 2021-08-10 20:59 Gnomeshghy 阅读(55) 评论(0) 推荐(0)
摘要: 软件开发架构 1.c/s架构2.b/s架构# b/s本质也是c/s架构​后端:将前端与数据库链接在一起 HTTP协议 """规定了浏览器与服务端之间数据交互的格式"""# 1.四大特性 1.基于TCP、IP之上的作用于应用层的协议 2.基于请求响应 3.无状态 见你千百遍我都当你如初见 ps:coo 阅读全文
posted @ 2021-08-09 19:41 Gnomeshghy 阅读(113) 评论(0) 推荐(0)
摘要: 背景属性 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> div { width: 400px; height:400px; /*background-color: 阅读全文
posted @ 2021-08-04 21:04 Gnomeshghy 阅读(55) 评论(0) 推荐(0)
摘要: 前端 什么是前端 只要是跟用户打交道的界面都称为前端 什么是后端? Python代码,Java,Go,PHP, nodejs, => (一堆后端代码) 为什么学前端 ​ 全栈开发 全栈:python, 前端, mysql, linux, docker 前端我们需要学到什么程度呢? 我们可以看懂别人写 阅读全文
posted @ 2021-08-02 21:26 Gnomeshghy 阅读(400) 评论(0) 推荐(0)
摘要: 查询条件之having # having的功能与where一样where 在分组之前用, where中写的条件必须在表中存在having 在分组之后用​# 查询每个部门中大于30岁的平均工资,并且,保留中平均工资在10000以上的。1. 过滤大于30岁的select *from dep where 阅读全文
posted @ 2021-07-30 22:27 Gnomeshghy 阅读(61) 评论(0) 推荐(0)
摘要: 常用的SQL语句 # 1. 添加字段 alter table t1 add age int 约束条件 ;(默认是加在最后) 了解: alter table t1 add age int 约束条件 after id; # 在id字段后加字段age alter table t1 add age int 阅读全文
posted @ 2021-07-30 22:25 Gnomeshghy 阅读(19) 评论(0) 推荐(0)
摘要: 约束条件 unsignedzerofillnot nulluniqueprimary keyauto_incrementdefault foreign key (外键 重要) 约束条件之外键(重要) 一对一一对多多对多 查询语句 select fromwheregroup by # 分组order 阅读全文
posted @ 2021-07-29 15:18 Gnomeshghy 阅读(42) 评论(0) 推荐(0)
摘要: 存储索引就是存储数据的方式​如何查看存储引擎? 都有哪些存储引擎? show engines; MyISAM: mysql5.5版本及之前的版本默认引擎 查询速度比InnoDB快, 安全性低 # 不支持事务 # 表级锁InnoDB mysql5.6及之后的版本默认引擎 查询速度比MyISAM慢, 安 阅读全文
posted @ 2021-07-27 20:57 Gnomeshghy 阅读(398) 评论(0) 推荐(0)
摘要: 数据库前期准备 """什么是数据库?​文件 软件开发目录 bin core conf db lib log => 数据库 => elasticsearch elk 全文搜索引擎 interface MySQL数据库​​# 单机游戏​优化: 网络游戏​""" 数据库的分类 """数据库本质其实是一个c 阅读全文
posted @ 2021-07-26 17:47 Gnomeshghy 阅读(46) 评论(0) 推荐(0)