2019年7月22日
摘要: ##Form介绍 ##forms组件能够帮你完成上面的三个过程 #forms组件的钩子函数 ##普通方式手写注册功能 def register(request): back_dic = {'username':'','password':''} if request.method == 'POST' 阅读全文
posted @ 2019-07-22 17:32 Icon-Liang 阅读(261) 评论(0) 推荐(0) 编辑
摘要: ##先创建app01 ##添加配置文件 ##新建路由映射 ##在app01目录视图函数views中创建cbv,可以在改类中创建get和post方法,会自动识别前端传来的方法请求响应 ##查看类绑定方法as_view ##查看view方法 ##查看dispatch方法 ##查看http_method_ 阅读全文
posted @ 2019-07-22 16:48 Icon-Liang 阅读(207) 评论(0) 推荐(0) 编辑
摘要: ##Django框架图解 ##前后端传输数据的编码格式 ##From表单和Ajax方式在前端往后端发送文件 def index(request): if request.method == 'POST': print(request.POST) print(request.FILES) # file 阅读全文
posted @ 2019-07-22 15:23 Icon-Liang 阅读(297) 评论(0) 推荐(0) 编辑