梦见世界

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页

2015年8月18日

摘要: #创建或修改session:request.session[key]=value#获取session:request.session.get(key,default=None)#删除sessiondelrequest.session[key]#不存在时报错 阅读全文
posted @ 2015-08-18 15:45 梦见世界 阅读(178) 评论(0) 推荐(0) 编辑

摘要: .gitignore 配置文件用于配置不需要加入版本管理的文件,配置好该文件可以为我们的版本管理带来很大的便利,以下是个人对于配置 .gitignore 的一些心得。1、配置语法: 以斜杠“/”开头表示目录; 以星号“*”通配多个字符; 以问号“?”通配单个字符 以方括号“[]”包含单个字符... 阅读全文
posted @ 2015-08-18 15:15 梦见世界 阅读(100) 评论(0) 推荐(0) 编辑

摘要: Form.as_p() :as_p()renders the form as a series oftags, with eachcontaining one field: 把form中的每项内容放置在标签中Form.as_ul():renders the form as a ser... 阅读全文
posted @ 2015-08-18 11:26 梦见世界 阅读(153) 评论(0) 推荐(0) 编辑

摘要: https://docs.djangoproject.com/en/1.8/ref/forms/widgets/Built-in widgets¶Django provides a representation of all the basic HTML widgets, plus some com... 阅读全文
posted @ 2015-08-18 10:31 梦见世界 阅读(196) 评论(0) 推荐(0) 编辑

2015年8月17日

摘要: 地址:http://blog.csdn.net/feelang/article/details/25040873 阅读全文
posted @ 2015-08-17 18:24 梦见世界 阅读(144) 评论(0) 推荐(0) 编辑

摘要: .headers ON 显示头部.help 帮助信息如果想列出该数据库中的所有表,可:.table如果想查看这些表的结构:select * from sqlite_master where type="table";默认情况下,不会出现红框中的表头,需要之前设置,命令为:.header on如果只想... 阅读全文
posted @ 2015-08-17 17:41 梦见世界 阅读(3587) 评论(0) 推荐(0) 编辑

摘要: django官网参考地址:https://docs.djangoproject.com/en/1.8/topics/auth/customizing/后半部分内容来源:http://www.weiguda.com/blog/28/1.如果是自定义的user,则首先需要在settings.py中设置A... 阅读全文
posted @ 2015-08-17 16:58 梦见世界 阅读(2517) 评论(0) 推荐(0) 编辑

摘要: 简言之:1, def func(*args) 中的args是一个列表,传递的参数是基于位置的。2, def func(**kwds) 中的kwds是一个字典,传递的参数是基于key的,即相当于func(a = 1, b = 2, ...)。混合参数顺序:def func(x, y = 1, *arg... 阅读全文
posted @ 2015-08-17 16:46 梦见世界 阅读(92) 评论(0) 推荐(0) 编辑

摘要: Python装饰器学习(九步入门)这是在Python学习小组上介绍的内容,现学现卖、多练习是好的学习方式。第一步:最简单的函数,准备附加额外功能12345678# -*- coding:gbk -*-'''示例1: 最简单的函数,表示调用了两次'''defmyfunc():print("myfunc... 阅读全文
posted @ 2015-08-17 15:51 梦见世界 阅读(150) 评论(0) 推荐(0) 编辑

摘要: django model 类型说明:https://docs.djangoproject.com/en/1.8/ref/models/fields/1.django model查询 1.Person.objects.raw("select * from myapp_person") # ... 阅读全文
posted @ 2015-08-17 12:03 梦见世界 阅读(266) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页