上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 96 下一页
摘要: """中间件的作用: 每次请求和相应的时候都会调用中间件的定义中间件的使用: 我们可以判断每次请求中是否携带了cookie中某些信息"""from django.http import HttpResponsedef simple_middleware(get_response): # 这里是 中间 阅读全文
posted @ 2021-03-04 23:03 干it的小张 阅读(90) 评论(0) 推荐(0)
摘要: 一、python导出所有已安装的模块 1、首先安装freeze模块 pip install freeze -i https://mirrors.aliyun.com/pypi/simple/ 安装成功 2、导出到桌面requirements.txt 文件 pip freeze> C:\Users\z 阅读全文
posted @ 2021-01-31 01:22 干it的小张 阅读(551) 评论(0) 推荐(0)
摘要: import reimport urllib.request, urllib.errorimport xlwtimport sqlite3from bs4 import BeautifulSoup# 指定url内容baseurl = "https://movie.douban.com/top250? 阅读全文
posted @ 2021-01-21 01:12 干it的小张 阅读(124) 评论(0) 推荐(0)
摘要: import reimport urllib.request, urllib.errorimport xlwtfrom bs4 import BeautifulSoupbaseurl = "https://movie.douban.com/top250?start="# 创建电影链接正则表达式对象, 阅读全文
posted @ 2021-01-20 23:20 干it的小张 阅读(105) 评论(0) 推荐(0)
摘要: import sqlite3# 打开或创建sqlite数据库conn = sqlite3.connect("test.db")print("opened database successfully")c = conn.cursor()# 创建表sql = ''' create table compa 阅读全文
posted @ 2021-01-20 23:17 干it的小张 阅读(462) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 96 下一页