摘要: st = ' hello Kitty 'str = 'hello {name} {age}'#print(st.format(name='fadfa'))#常用的字符串方法print(st.count)print(st.count('l'))print(st.center(50,'#'))print 阅读全文
posted @ 2017-02-19 19:20 noube 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 所有的数据错做都用这个表结构 表结构 from django.db import models from django.contrib.auth.models import User # Create your models here. class Customer(models.Model): ' 阅读全文
posted @ 2017-01-09 18:03 noube 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Django Paginator Django 分页官方文档 https://docs.djangoproject.com/en/1.10/topics/pagination/ 此分页方法没有限制显示出来的页码的个数,会显示全部的页码,待改进。 后端代码 由于代码是先object_list = mo 阅读全文
posted @ 2017-01-09 12:59 noube 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 通过 importlib模块 反射字符串的对象 Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux Django 1.10.4 >>> from crm import models #使用importlib模块的import_module方法就可以实现动态的导入 >>> import im... 阅读全文
posted @ 2017-01-08 11:45 noube 阅读(222) 评论(0) 推荐(0) 编辑
摘要: Session: session是服务器端生成保存的一个键值对 , session内部机制依赖于cookie 。 用户登录后返回给客户端一个随机字符串,客户端带着随机字符串访问服务器,用于验证是否登录。 用户登录并创建session: 装饰器:用于判断是否登录 注销登录 用面向对象的方法实现 登录和 阅读全文
posted @ 2016-12-14 18:56 noube 阅读(365) 评论(0) 推荐(0) 编辑
摘要: 系统版本 ubuntu Kylin 16.04 LTS 报错1:安装pip3 安装 Django 总是提示time out,无法安装。 改用国内源: 豆瓣源: 还有其他的解决方案,如修改配置文件 [global]块,的超时时间等 报错2: error: command 'x86_64-linux-g 阅读全文
posted @ 2016-12-12 23:43 noube 阅读(595) 评论(0) 推荐(0) 编辑
摘要: 首页 提交 (function (){ $.ajax({ url : "http://www.jxntv.cn/data/jmd jxtv2.html", type:"GET", dataType:"jsonp", } ) }()); function list(e) { console.log(e 阅读全文
posted @ 2016-12-03 20:51 noube 阅读(205) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/noube/articles/6096880.html Django和session :http://www.cnblogs.com/noube/articles/6126949.html 阅读全文
posted @ 2016-12-02 19:04 noube 阅读(92) 评论(0) 推荐(0) 编辑
摘要: JavaScript的组成部分 一个完整的 JavaScript 实现是由以下 3 个不同部分组成的: 核心(ECMAScript) 文档对象模型(DOM) Document object model (整合js,css,html) 浏览器对象模型(BOM) Broswer object model 阅读全文
posted @ 2016-11-09 17:26 noube 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 一、并发性 并发性是oltp数据库最重要的特性,但并发涉及到资源的获取、共享与锁定。 mysql:mysql以表级锁为主,对资源锁定的粒度很大,如果一个session对一个表加锁时间过长,会让其他session无法更新此表中的数据。虽然InnoDB引擎的表可以用行级锁,但这个行级锁的机制依赖于表的索 阅读全文
posted @ 2016-10-20 11:28 noube 阅读(249) 评论(0) 推荐(0) 编辑