打开文件 :返回一个文件对象 open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None) mode: r 只能读 r+ 可读可写,不会创建不存在的文件, ...
分类:
其他好文 时间:
2018-02-27 19:29:17
阅读次数:
138
再此之前我们已经完成了用户登录、注册、注销等功能,接下来让我们继续为用户提供修改密码的功能。该功能 Django 的 auth 应用也已经为我们提供,过程几乎和之前的登录功能完全一样。 编写修改密码模板 修改密码的的视图函数默认渲染的模板名为 password_change_form.html,因此 ...
分类:
其他好文 时间:
2018-02-25 19:22:52
阅读次数:
174
引言: 互联网服务压测是非常重要的评价方法,ab,webbench,jmeter等都是业界流行的测试工具,ab和webbench作为shell模式下轻量级的测试工具,jmeter则作为有GUI界面的更高级测试工具,各有特点,ab比webbench功能更多一些,所以这里选择ab和jmeter来做一个对 ...
分类:
其他好文 时间:
2018-02-25 13:03:34
阅读次数:
148
一、Form基本使用 类 字段 is_valid() cleaned_data errors 字段参数: max_length min_length validators = [RegexValidators("xxx")] 钩子函数 clean_字段名 注意: 必须有返回值 只能拿自己当前字段值 ...
分类:
其他好文 时间:
2018-02-21 11:38:15
阅读次数:
392
When communicating with some backend API, data travels over the network using the HTTP protocol. As such, failures may occur, be it on our own device ...
分类:
Web程序 时间:
2018-02-14 21:05:10
阅读次数:
1297
Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans.xsd). For more information, right click on the message in th ...
分类:
其他好文 时间:
2018-02-12 15:16:19
阅读次数:
142
一. 简介 shutil 是高级的文件,文件夹,压缩包处理模块。 二. 使用 shutil.copyfileobj(fsrc, fdst[, length])将文件内容拷贝到另一个文件中 123import shutil shutil.copyfileobj(open('old.xml','r'), ...
分类:
编程语言 时间:
2018-02-07 21:22:49
阅读次数:
237
If you shut the door to all errors, truth will be shut out. 你如果拒绝面对错误,真相也会被挡在门外。 Sometimes being a fool who knows nothing is happier than being a man ...
分类:
其他好文 时间:
2018-02-07 00:43:48
阅读次数:
182
把从Oracle数据库导出的数据导入到MySql数据库中1. 使用默认的结束符号导入到MySql数据库中: LOAD DATA LOCAL INFILE 'd:/oracle.txt' IGNORE INTO TABLE alarmLog 此时Fields的结束符默认的就是'/t'制表符,而不是"/ ...
分类:
数据库 时间:
2018-02-06 18:18:09
阅读次数:
190