上一页 1 ··· 4 5 6 7 8 9 下一页
摘要: 多继承 按顺序 调用, 继承 A B 优先使用A 里面的方法 阅读全文
posted @ 2022-04-04 23:46 我在春天等伱 阅读(41) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-04-04 21:35 我在春天等伱 阅读(23) 评论(0) 推荐(0)
摘要: 1. if 语句 2. 逻辑运算与 if 混合使用 阅读全文
posted @ 2022-04-04 21:24 我在春天等伱 阅读(28) 评论(0) 推荐(0)
摘要: 2. 变量类型 案例 : 1. strip() 删除 字符串的空格 与 特殊字 \t\r\n 都会被清除 1. 阅读全文
posted @ 2022-04-04 18:15 我在春天等伱 阅读(27) 评论(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 @ 2022-04-04 13:53 我在春天等伱 阅读(211) 评论(0) 推荐(0)
摘要: views.py 代码 '''手机靓号列表''' def number_list(request): # 建立一个空字典 data_dict = {} #接受查询数据 search_data = request.GET.get('q', '') #搜索 if search_data: data_di 阅读全文
posted @ 2022-04-04 08:40 我在春天等伱 阅读(205) 评论(0) 推荐(0)
摘要: views.py '''增加靓号''' from django.core.validators import RegexValidator class NumberModelForm(forms.ModelForm): # 重新定义一次 手机号的格式问题 mobile = forms.CharFie 阅读全文
posted @ 2022-04-03 21:42 我在春天等伱 阅读(3536) 评论(0) 推荐(0)
摘要: 1. html代码 <span style="color: #f90">{{ field.errors.0 }}</span> 2. viewa.py '''高级方法添加 待验证方法循环'''class UserModelForm(forms.ModelForm): # 进一步对数据校验 如: na 阅读全文
posted @ 2022-04-03 12:59 我在春天等伱 阅读(84) 评论(0) 推荐(0)
摘要: modelform 代码案例 : html 文件 {% for ziduan in form %} <div class="form-group"> <label for="exampleInputEmail1"> {{ ziduan.label }}</label> {{ ziduan }} </ 阅读全文
posted @ 2022-04-02 20:15 我在春天等伱 阅读(48) 评论(0) 推荐(0)
摘要: 1. srtting.py 文件去掉代码 'DIRS': [] 2. bootstrap 的引入路径 {% load static %} 绝对路径 #样式路径 <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"> <s 阅读全文
posted @ 2022-04-02 14:22 我在春天等伱 阅读(101) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 下一页