上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 28 下一页
摘要: 1,防止Xss攻击 阅读全文
posted @ 2018-01-09 15:14 forjie 阅读(377) 评论(0) 推荐(0) 编辑
摘要: CBV样式 to_dict 取值 模板语法 session相关 app.config 阅读全文
posted @ 2018-01-09 15:08 forjie 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1,querydict用法: 2,类里面的迭代功能:def __iter__(self): 3,在JSON传到html页面的时候,中文也可以显示 ensure_ascii=False 4,通过对象反向找与之关联类名以及所有对象 5,通过Q把类里的字段一起判断,结果是一个键值对 阅读全文
posted @ 2018-01-03 20:37 forjie 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 1,通过pip安装 2,通过源码安装 阅读全文
posted @ 2017-12-31 23:01 forjie 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 第一:优先写好email文件代码, 第二部:写好配置信息,以后要改只要改配置信息就行. 第三部: 阅读全文
posted @ 2017-12-29 00:39 forjie 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 转义符 1,调用mark_safe from django.utils.safestring import mark_safe 2,调用conditional_escape from django.utils.html import conditional_escape3,调用QueryDict from django.http import QueryDict ... 阅读全文
posted @ 2017-12-17 17:02 forjie 阅读(793) 评论(0) 推荐(0) 编辑
摘要: 1: list_display 列表时,定制显示的列。 return "xxxxx" 2,list_editable,列表时,可以编辑的列 3,分页 5,search_fields,列表时,模糊搜索的功能 阅读全文
posted @ 2017-12-13 21:27 forjie 阅读(235) 评论(0) 推荐(0) 编辑
摘要: django type创建类 ModelForm类创建 标签(空格分隔): 一:type创建对象格式 type创建类格式:type('类名',(继承的类名,),字段名) 例: Myform=type('Myform',(Form,),fields_dict) 继承一个Form类,并且fields_d 阅读全文
posted @ 2017-12-10 22:36 forjie 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 一:AJAX核心(XMLHttpRequest) 其实AJAX就是在Javascript中多添加了一个对象:XMLHttpRequest对象。所有的异步交互都是使用XMLHttpServlet对象完成的。也就是说,我们只需要学习一个Javascript的新对象即可。 注意,各个浏览器对XMLHttp 阅读全文
posted @ 2017-11-30 23:01 forjie 阅读(1286) 评论(0) 推荐(0) 编辑
摘要: 一:jsonp同源策略: http://127.0.0.1:8001项目的index <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="http://cod 阅读全文
posted @ 2017-11-30 19:54 forjie 阅读(589) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 28 下一页