会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Sch01aR#
三更灯火五更鸡,正是男儿发愤时
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
39
40
41
42
43
44
45
46
47
···
78
下一页
2019年9月11日
Python - Django - 自定义一个中间件
摘要: 中间件简介: 中间件是在 wsgi.py 之后,urls.py 之前,在全局操作 Django 请求和响应的模块 在 settings.py 中可以看到中间件的相关配置 该列表中的每一个元素都是一个类,一个中间件 例如: django.middleware.csrf.CsrfViewMiddlewa
阅读全文
posted @ 2019-09-11 18:37 Sch01aR#
阅读(2362)
评论(0)
推荐(0)
2019年9月10日
Python - Django - form 组件动态从数据库取 choices 数据
摘要: app01/models.py: from django.db import models class UserInfo(models.Model): username = models.CharField(max_length=16) password = models.CharField(max
阅读全文
posted @ 2019-09-10 20:51 Sch01aR#
阅读(1658)
评论(0)
推荐(0)
Python - Django - form 组件自定义校验
摘要: reg2.html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>注册页面</title> <link rel="stylesheet" href="/static/bootstrap/css/boots
阅读全文
posted @ 2019-09-10 18:06 Sch01aR#
阅读(562)
评论(0)
推荐(0)
2019年9月7日
Python - Django - form 组件内置的正则校验器
摘要: app01/models.py: from django.db import models class UserInfo(models.Model): username = models.CharField(max_length=16) password = models.CharField(max
阅读全文
posted @ 2019-09-07 16:45 Sch01aR#
阅读(701)
评论(0)
推荐(0)
Python - Django - form 组件校验功能
摘要: app01/models.py: from django.db import models class UserInfo(models.Model): username = models.CharField(max_length=16) password = models.CharField(max
阅读全文
posted @ 2019-09-07 15:16 Sch01aR#
阅读(310)
评论(0)
推荐(0)
2019年9月6日
Python - Django - 使用 Bootstrap 样式修改注册页
摘要: reg2 函数: from django.shortcuts import render, HttpResponse from app01 import models def reg2(request): form_obj = RegForm() # GET 请求 if request.method
阅读全文
posted @ 2019-09-06 22:01 Sch01aR#
阅读(698)
评论(0)
推荐(0)
2019年9月5日
Python - Django - form 组件常用的字段和字段参数
摘要: 邮箱: views.py: from django import forms from django.forms import widgets class RegForm(forms.Form): email = forms.EmailField( label="邮箱", widget=widget
阅读全文
posted @ 2019-09-05 22:39 Sch01aR#
阅读(543)
评论(0)
推荐(0)
Python - Django - form 组件基本用法
摘要: 普通 form 表单的处理: reg.html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>注册页面</title> </head> <body> <form action="/reg/" method
阅读全文
posted @ 2019-09-05 18:32 Sch01aR#
阅读(606)
评论(0)
推荐(0)
2019年9月4日
Python - Django - SweetAlert 插件的使用
摘要: SweetAlert Github:https://github.com/lipis/bootstrap-sweetalert 下载完后放入 /static/ 目录下 sweetalert.html: <!DOCTYPE html> <html lang="en"> <head> <meta cha
阅读全文
posted @ 2019-09-04 23:10 Sch01aR#
阅读(846)
评论(0)
推荐(0)
2019年9月3日
Python - Django - 序列化
摘要: app01/__int__.py: import pymysql pymysql.install_as_MySQLdb() app01/models.py: from django.db import models class Person(models.Model): name = models.
阅读全文
posted @ 2019-09-03 22:11 Sch01aR#
阅读(230)
评论(0)
推荐(0)
上一页
1
···
39
40
41
42
43
44
45
46
47
···
78
下一页
公告