上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页
摘要: 重要:js onclick() 函数中,取不到this !!! 错误的写法: 正确的写法是:函数定义时带参数,调用时传入this <button onclick="test(this)"> 阅读全文
posted @ 2018-12-09 00:27 蛋尼 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 参考:https://blog.csdn.net/qcyfred/article/details/78045857 阅读全文
posted @ 2018-12-04 16:16 蛋尼 阅读(582) 评论(0) 推荐(0) 编辑
摘要: # python 文件读写,使用with避免try...finally的繁琐 # 1、读取全部内容.文件太大可能会把内存爆了, 可用file.read()限制读取大小 with open("test.txt", "r", encoding='utf8', errors='ignore') as file: print("1: ", file.read()) # 2、按行读取,适合读取配置... 阅读全文
posted @ 2018-11-22 11:56 蛋尼 阅读(134) 评论(0) 推荐(0) 编辑
摘要: python 如何获取当前文件/文件夹? 1、获取当前文件的实际路劲: os.path.realpath(__file__) ==> D:\python_test\test_path.py 2、获取文件夹 os.path.dirname(os.path.realpath(__file__)) ==> 阅读全文
posted @ 2018-11-20 14:47 蛋尼 阅读(2118) 评论(0) 推荐(0) 编辑
摘要: 直接用命令行添加即可:python manage.py createsuperuser 阅读全文
posted @ 2018-11-18 15:44 蛋尼 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 马克,待不时之需 Django 图表制作(By Highcharts):https://blog.csdn.net/Temanm/article/details/54141759 免费而优秀的图表JS插件 阅读全文
posted @ 2018-11-16 17:24 蛋尼 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 马克,备用: Jenkins 二次开发 https://testerhome.com/topics/14988?locale=zh-TW python-jenkins api 文档:https://python-jenkins.readthedocs.io/en/latest/api.html Je 阅读全文
posted @ 2018-11-14 10:49 蛋尼 阅读(1003) 评论(0) 推荐(0) 编辑
摘要: 字段太多的话,手动建表,然后用 inspectdb 命令生成model文件,效率会高很多: inspectdb 表名 >> model文件名.py >> 是追加在文件末尾;> 覆盖原文件 如果是多个数据库配置,可以用--database来指定数据库 如果是多环境配置,则需要指定环境。在命令后追加: 阅读全文
posted @ 2018-11-12 20:48 蛋尼 阅读(664) 评论(0) 推荐(0) 编辑
摘要: 在模板中格式化日期: 阅读全文
posted @ 2018-11-12 20:43 蛋尼 阅读(902) 评论(0) 推荐(0) 编辑
摘要: 模板的for循环中,如何获取序号? 想过用enumerate,但是在模板中会报错 Could not parse the remainder xxx; 后来搜到 forloop.counter,完美解决 参考:http://www.cnblogs.com/chenkeven/articles/934 阅读全文
posted @ 2018-11-12 20:41 蛋尼 阅读(2779) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页