上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页
摘要: MIddel模块执行顺序:process_request->process_view->views函数->process_response 出现异常执行顺序:process_request->process_view->views函数出现异常->process_exception->process_ 阅读全文
posted @ 2021-06-04 14:56 安好_世界 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 不要注释掉CsrfMIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.co 阅读全文
posted @ 2021-06-03 17:32 安好_世界 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 一、为什么要创建索引呢(优点)?创建索引可以大大提高系统的性能。第一, 通过创建唯一性索引,可以保证数据库表中每一行数据的唯一性。第二, 可以大大加快数据的检索速度,这也是创建索引的最主要的原因。第三, 可以加速表和表之间的连接,特别是在实现数据的参考完整性方面特别有意义。第四, 在使用分组和排序子 阅读全文
posted @ 2021-05-28 16:50 安好_世界 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #查询 select * from t_user where id=1; 关联查询 select * from a left join b on a.id=b.id; select * from a right join b on a.id=b.id; select * from a inner j 阅读全文
posted @ 2021-05-28 10:31 安好_世界 阅读(30) 评论(0) 推荐(0) 编辑
摘要: cookie: 理解为客户端浏览器上的一个文件 类似字典存储{'k':'v' } 基于cookie做用户验证时,敏感信息不适合放在cookie中 1、获取Cookie: request.COOKIES['key'] request.get_signed_cookie(key, default=RAI 阅读全文
posted @ 2021-05-25 18:03 安好_世界 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 1.安装gcc编译器 gcc编译器有些系统版本已经默认安装了,可以通过 gcc --version进行查看 yum -y install gcc 2.安装其它依赖包 yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel s 阅读全文
posted @ 2021-05-18 16:19 安好_世界 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 首先进入MySQL官网下载rpm安装包 用yum install mysql80-community-release-el7-3.noarch.rpm 安装 yum repolist all|grep mysql可以看到仓库默认开启的是8.0, yum install yum-utils –y 安装 阅读全文
posted @ 2021-05-18 15:55 安好_世界 阅读(68) 评论(0) 推荐(0) 编辑
摘要: XSS: {{ page_str|safe }} from django.utils.safestring import mark_safe mark_safe(page_str)#保证回传数据安全的 前端页面: <!DOCTYPE html> <html lang="en"> <head> <me 阅读全文
posted @ 2021-05-12 23:24 安好_世界 阅读(57) 评论(0) 推荐(0) 编辑
摘要: - 自定义函数 simple_tag a. app下创建templatetags目录 b. 任意xxoo.py文件 c. 创建template对象 register d. @register.simple_tag def func(a1,a2,a3....) return "asdfasd" e. 阅读全文
posted @ 2021-04-15 21:39 安好_世界 阅读(57) 评论(0) 推荐(0) 编辑
摘要: include导入模板 <form> <input type="text"> <input type="submit"> </form> {% extends 'master.html' %} {% block title %}你猜{% endblock %} {% block content %} 阅读全文
posted @ 2021-04-14 22:12 安好_世界 阅读(52) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页