摘要: 1. re 正则表达式 提取数据 用法: 实战 : 案例 : 2. xpath 提取数据 方法一 1. 引用 2. 用法 方法二 sel = parsel.Selector(resp) # 当前图片的数量 num = sel.xpath('//div[@id="pages"]/a/text()') 阅读全文
posted @ 2022-04-27 16:11 我在春天等伱 阅读(173) 评论(0) 推荐(0)
摘要: 1. 显示当前git 所在位置 主线(master) git branch 2. 新建分支bug git branch bug 3. 切换到新建的分支 修复 bug 代码 git checkout bug 4. 修复完毕 合并分支 , 首先要切换到 主线(master) 里面 合并时出现 冲突 代码 阅读全文
posted @ 2022-04-21 11:43 我在春天等伱 阅读(27) 评论(0) 推荐(0)
摘要: 1. 安装 2. 使用 , 进入当前目录 3. 配置邮箱与用户名 git config --global user.email "121340751@qq.com" git config --global user.name "流浪" git init 初始化 git clone url 克隆到本地 阅读全文
posted @ 2022-04-20 21:08 我在春天等伱 阅读(21) 评论(0) 推荐(0)
摘要: pip install -i https://pypi.douban.com/simple openpyxl上面是导入表格的插件 1. 静态文件 <div class="form-group"> <label for="exampleInputFile">上传文件</label> <input ty 阅读全文
posted @ 2022-04-17 19:49 我在春天等伱 阅读(50) 评论(0) 推荐(0)
摘要: 1. 静态页面 {% extends 'layout.html' %} {% block content %} <div class="container"> <!-- Button trigger modal --> <button type="button" class="btn btn-suc 阅读全文
posted @ 2022-04-16 11:25 我在春天等伱 阅读(83) 评论(0) 推荐(0)
摘要: 1. 静态页面 {% extends 'layout.html' %} {% block content %} <div class="container"> <!-- Button trigger modal --> <button type="button" class="btn btn-suc 阅读全文
posted @ 2022-04-15 16:13 我在春天等伱 阅读(260) 评论(0) 推荐(0)
摘要: 1. 静态页面 <div class="panel panel-default"> <div class="panel-heading"> 小案例 ajax学习之路 - jq 绑定事件 - 表单提交 </div> <div class="panel-body"> <form method="post 阅读全文
posted @ 2022-04-15 10:39 我在春天等伱 阅读(184) 评论(0) 推荐(1)
摘要: from django.shortcuts import render, HttpResponse, redirect def task_list(request): return render(request, 'task.html') def task_ajax(request): print( 阅读全文
posted @ 2022-04-13 15:53 我在春天等伱 阅读(63) 评论(0) 推荐(0)
摘要: 1. 设置cookie 值 request.session['info'] = {'id': admin_row.id, 'name': admin_row.username} 2. 获取cookie info_dict = request.session.get['info'] info_dict 阅读全文
posted @ 2022-04-12 16:32 我在春天等伱 阅读(397) 评论(0) 推荐(0)
摘要: 1. 建立文件夹 创建文件 auth.py from django.utils.deprecation import MiddlewareMixin from django.shortcuts import redirect '''中间件''' class AuthMiddleware(Middle 阅读全文
posted @ 2022-04-12 16:17 我在春天等伱 阅读(121) 评论(0) 推荐(0)