2015年11月3日
摘要: 常用数据类型# https://docs.djangoproject.com/en/1.8/ref/models/fields/#field-typesBooleanField:布尔类型true/falseNullBooleanField:相当于设置了null=True的BooleanFieldIn... 阅读全文
posted @ 2015-11-03 16:58 letong 阅读(283) 评论(0) 推荐(0) 编辑
2015年10月31日
摘要: 本人小白全栈一枚,给公司写了一个监控中心,要求严重报警的时候需要触发音频播放,于是就有了以下的折腾。刚开始一切都很顺利,自然而然的写了以下代码。 // 触发播放audioPlay();//清除定时任务clearTimeout(tt); 随意在PC端测试了下,完美,然后我就没管它了....直到... 阅读全文
posted @ 2015-10-31 17:06 letong 阅读(5152) 评论(1) 推荐(0) 编辑
2015年8月24日
摘要: 描述:实现运维平台的异步执行与定时任务,以下简单描述了安装过程及使用。安装django和celerypip install djangopip install celery pip install django-celery新建一个项目名为newsroot@bogon:~# django-admin... 阅读全文
posted @ 2015-08-24 00:12 letong 阅读(1050) 评论(1) 推荐(0) 编辑
2015年8月21日
摘要: 描述:ElasticSearch是一个基于Lucene的搜索服务器。它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口。下面介绍了利用Python API接口进行数据查询,方便其他系统的调用。安装APIpip install elasticsearch建立es连接from e... 阅读全文
posted @ 2015-08-21 22:54 letong 阅读(27553) 评论(3) 推荐(4) 编辑
2015年8月20日
摘要: 创建文件New-Item -path $file_path -itemtype file创建目录New-Item -path $dir_path -type directory删除目录Remove-Item-Force-Recurse $dir赋予权限$account ="Business"$Fol... 阅读全文
posted @ 2015-08-20 10:28 letong 阅读(433) 评论(0) 推荐(0) 编辑