上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页
摘要: Django之views视图函数 views视图函数属于MTV中逻辑处理的部分 视图函数包含着两个对象,HttpRequest对象和HttpResponse对象 一.HttpRequest对象 HttpRequest对象在Django中会默认传到views函数中作为第一个参数 HttpRequest 阅读全文
posted @ 2024-03-15 10:11 冀未然 阅读(29) 评论(0) 推荐(0)
摘要: model update常规用法 摘自: https://www.cnblogs.com/skbarcode/p/12584387.html 假如我们的表结构是这样的 class User(models.Model): username = models.CharField(max_length=2 阅读全文
posted @ 2024-03-15 10:02 冀未然 阅读(108) 评论(0) 推荐(0)
摘要: Django model select的各种用法详解 摘自: https://www.cnblogs.com/skbarcode/p/12584387.html 基本操作 # 获取所有数据,对应SQL:select * from User User.objects.all() # 匹配,对应SQL: 阅读全文
posted @ 2024-03-15 09:53 冀未然 阅读(133) 评论(0) 推荐(0)
摘要: django 动态查询实现过程 一、背景描述 在前端页面上有查询功能,要查询的输入选择有username,address,mobile等,可以通过任意一个查询,或者任意组合进行查询。 后端,获取传入的数值。判断哪个有输入,再在数据库中进行查询 二、解决方案 根据条件,动态实现查询过程 conditi 阅读全文
posted @ 2024-03-11 14:21 冀未然 阅读(78) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2024-03-04 09:48 冀未然 阅读(0) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>制作带logo的二维码</title> <script type="text/javascript" src='../static/bootstrap-3.4.1/js/jquer 阅读全文
posted @ 2024-02-28 08:35 冀未然 阅读(107) 评论(0) 推荐(0)
摘要: 上一篇《Python 面向对象(初级篇)》文章介绍了面向对象基本知识: 面向对象是一种编程方式,此编程方式的实现是基于对 类 和 对象 的使用 类 是一个模板,模板中包装了多个“函数”供使用(可以讲多函数中公用的变量封装到对象中) 对象,根据模板创建的实例(即:对象),实例用于调用被包装在类中的函数 阅读全文
posted @ 2024-02-23 15:41 冀未然 阅读(32) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2024-02-23 14:06 冀未然 阅读(0) 评论(0) 推荐(0)
摘要: python获取ie选项中设置的代理 import winreg def getproxy(): xpath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings" try: key = winreg.OpenKey(winre 阅读全文
posted @ 2024-01-24 16:45 冀未然 阅读(31) 评论(0) 推荐(0)
摘要: Python生成随机验证码,需要使用PIL模块. 安装: pip3 install pillow 基本使用 1. 创建图片 from PIL import Image img = Image.new(mode='RGB', size=(120, 30), color=(255, 255, 255)) 阅读全文
posted @ 2024-01-23 10:37 冀未然 阅读(40) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页