摘要: cookies 客户端浏览器上的一个文件 获取cookie: 写cookie: cookies参数 客户端操作cookie: 使用jquery插件:jquery.cookie.js 密文cookie: session a.Session 原理 session是保存在服务器端的键值对。 b.Cooki 阅读全文
posted @ 2017-11-05 15:20 痴道三 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 模板 在Templates中添加母版: - 母版...html 母版(master.html)中可变化的地方加入: 在子版 (usermg.html) 中设置如下: 导入小组件的模块: 自定义模板语言函数simple_tag: 新建templatetags文件夹,创建函数文件xxxx.py: (1) 阅读全文
posted @ 2017-11-05 11:39 痴道三 阅读(533) 评论(0) 推荐(0) 编辑
摘要: 请求周期: url > 路由 > 函数或类 > 返回字符串或模板语言 Form 表单提交: 先处理模板语言再讲HTML发出去 提交 > url > 函数或类中的方法 ———— - httpResponse() | render(request) | redirect('/index') | 用户 < 阅读全文
posted @ 2017-11-05 10:50 痴道三 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 一、初始Ajax ajax的写法: ajax的使用: 一些注意的地方: 当数据有列表时,加入traditional 加入dataType 可以自动将字符串转换为json对象形式 二、多对多 创建多对多: 操作: 阅读全文
posted @ 2017-11-01 10:32 痴道三 阅读(700) 评论(0) 推荐(0) 编辑
摘要: 一、前言 使用pyautocad编辑好cad图纸后,往往涉及到一个保存的问题,但是官方文档并未提及,所以只能自己来了,测试了好久,终于是找到了保存的命令和参数说明。 二、方法介绍 Autocad.doc.SaveAs() Autocad.doc.SaveAs() autocad文档如下: Signa 阅读全文
posted @ 2017-10-20 17:12 痴道三 阅读(4965) 评论(0) 推荐(0) 编辑
摘要: 一、处理AutoCad模块 -pyautocad 1.安装 注:1.该操作会自动安装 comtypes模块,如果其他方式安装,请自行安装comtypes模块 2.如要使用tables 命令,要另外安装xlrd 和 tablib 2.使用准备 pyautocad 通过调用autocad的com接口,具 阅读全文
posted @ 2017-10-20 14:01 痴道三 阅读(6132) 评论(8) 推荐(0) 编辑
摘要: from yaml import load,dump f = open('xx.ymal',encoding='utf-8') l = load(f) print(f) w = open('xx_copy.ymal','w',wencoding = 'utf-8') dump(l,w,allow_u 阅读全文
posted @ 2017-09-07 23:34 痴道三 阅读(4478) 评论(0) 推荐(0) 编辑
摘要: 在类中的私有属性设置: class Name(): __init__(self): self.__name = 'arnol'` 如何查看: 1,在类中定义一个方法: def getname(self): print(self.__name) 2.强制访问: n = Name() print(n._ 阅读全文
posted @ 2017-09-07 11:46 痴道三 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 业内: GET:获取数据 POST:提交数据 上传单个数据: request.POST.get(‘’name名‘’) 上传多选数据: request.POST.getlist('name名') 上传文件:obj = request.FILES.get('name名') obj.chunks() -生 阅读全文
posted @ 2017-08-26 22:30 痴道三 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 1.js正则表达式 http://www.cnblogs.com/wupeiqi/articles/5602773.html test - 判断字符串是否符合规定的正则 正则表达式: rep = /\d+/ rep.test('aas99sj') #true 正则表达式: rep = /^\d+$/ 阅读全文
posted @ 2017-08-20 20:22 痴道三 阅读(182) 评论(0) 推荐(0) 编辑