摘要: 概要: 1、采集资产 2、API 一、资产采集 1、采集方式的配置 2、插件的定制 3、测试模式 4、错误日志(必须是行级的详细错误信息) 5、汇报数据--》遵循资产的唯一性 (1)只针对物理机(不包括虚拟机),SN号作为唯一标识 (2)建立规则:以不重复的主机名为唯一标识,且把主机名存储在文件中, 阅读全文
posted @ 2017-03-02 20:23 willpower-chen 阅读(1010) 评论(0) 推荐(0) 编辑
摘要: 一、requests Requests 是使用 Apache2 Licensed 许可证的 基于Python开发的HTTP 库,其在Python内置模块的基础上进行了高度的封装,从而使得Pythoner进行网络请求时,变得美好了许多,使用Requests可以轻而易举的完成浏览器可有的任何操作。 1、 阅读全文
posted @ 2017-03-01 15:04 willpower-chen 阅读(979) 评论(0) 推荐(0) 编辑
摘要: 一、组合搜索 参考: http://www.cnblogs.com/ccorz/p/5985205.html 二、JSONP 1、在同源策略下,在某个服务器下的页面是无法获取到该服务器以外的数据的,但img、iframe、script等标签是个例外,这些标签可以通过src属性请求到其他服务器上的数据 阅读全文
posted @ 2017-02-24 09:13 willpower-chen 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 一、ModelForm操作及验证 1、class Meta:class Meta: 如: 数据库中 2016-12-27 04:10:57 setting中的配置 TIME_ZONE = 'Asia/Shanghai' USE_TZ = True 则显示: 2016-12-27 12:10:57 2 阅读全文
posted @ 2017-02-08 16:36 willpower-chen 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 一、一大波model操作 1. 创建数据库表 # 单表 # app01_user ==> tb1 # users class User(models.Model): name = models.CharField(max_length=32) pwd = models.CharField(max_l 阅读全文
posted @ 2017-01-18 20:42 willpower-chen 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 知识点概要 - Session - CSRF - Model操作 - Form验证(ModelForm) - 中间件 - 缓存 - 信号 一、 Session 基于Cookie做用户验证时:敏感信息不适合放在cookie中 a. Session原理 Cookie是保存在用户浏览器端的键值对 Sess 阅读全文
posted @ 2017-01-13 08:37 willpower-chen 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 一、请求周期 url> 路由 > 函数或类 > 返回字符串或者模板语言? 1、Form表单提交: 提交 -> url > 函数或类中的方法 - .... HttpResponse('....') render(request,'index.html') redirect('/index/') 用户 阅读全文
posted @ 2016-12-29 18:01 willpower-chen 阅读(482) 评论(0) 推荐(0) 编辑
摘要: 1、Django请求的生命周期 路由系统 -> 试图函数(获取模板+数据=》渲染) -> 字符串返回给用户 2、路由系统 /index/ -> 函数或类.as_view() /detail/(\d+) -> 函数(参数) 或 类.as_view()(参数) /detail/(?P<nid>\d+) 阅读全文
posted @ 2016-12-22 00:32 willpower-chen 阅读(450) 评论(0) 推荐(0) 编辑
摘要: 一、路由系统,URL 1、函数及类 函数:url(r'^index/', views.index), 类:url(r'^home/', views.Home.as_view()), 2、顺序 url(r'^detail-(\d+)-(\d+).html', views.detail), 3、字典 u 阅读全文
posted @ 2016-12-15 11:41 willpower-chen 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 一、JS正则 test - 判断字符串是否符合规定的正则 rep = /\d+/; rep.test("asdfoiklfasdf89asdfasdf") # true rep = /^\d+$/; rep.test("asdfoiklfasdf89asdfasdf") # true exec - 阅读全文
posted @ 2016-12-08 11:33 willpower-chen 阅读(467) 评论(0) 推荐(0) 编辑