主要集中在新特性上。

Django1.8好像开始推荐使用python3

Django的QuerySet是延迟加载的,这个文档里面一般会明言,通过Connection SQL显示测试,外键对象也是延迟加载的。

Django1.8的get filter等方法继续在aptana pydev下error:undefined variables from import,不过收费的pycharm似乎解决自django1.7以后出现的这个问题。

Web development is often broad, not deep – problems span many domains.

One-to-one relationships:This is most useful on the primary key of an object when that object “extends” another object in some way.It is Model inheritance too.

A field name cannot contain more than one underscore in a row, due to the way Django’s query lookup syntax works

limiting the queryset using an array slice or an index will not populate the cache.

If you need to execute more complex queries (for example, queries with OR statements), you can use Q objects.

Note that delete() is the only QuerySet method that is not exposed on a Manager itself. This is a safety mechanism to prevent you from accidentally requesting Entry.objects.delete(), and deleting all the entries.

Forward access to one-to-many relationships is cached the first time the related object is accessed.

对Model层的重新认识,以前一直认为Django的Model层不过是一个Active Record模式的Data Access Layer层,最近重新通篇阅读Guide文档,发现认识有所不足:它不仅是一个自下而上设计实现的数据访问设施,而且是一个面向领域业务模型自上而下设计的模型实现层.

However, when a values() clause is used to constrain the columns that are returned in the result set, the method for evaluating annotations is slightly different. Instead of returning an annotated result for each result in the original QuerySet, the original results are grouped according to the unique combinations of the fields specified in the values() clause.

Class inheritance and model managers aren’t quite a perfect match for each other.

Avoid catching exceptions inside atomic!

As well as caching of the whole QuerySet, there is caching of the result of attributes on ORM objects. In general, attributes that are not callable will be cached,But in general, callable attributes cause DB lookups every time.

Django1.8文档阅读手记的更多相关文章

  1. Node.js的下载、安装、配置、Hello World、文档阅读

    Node.js的下载.安装.配置.Hello World.文档阅读

  2. 我的Cocos Creator成长之路1环境搭建以及基本的文档阅读

    本人原来一直是做cocos-js和cocos-lua的,应公司发展需要,现转型为creator.会在自己的博客上记录自己的成长之路. 1.文档阅读:(cocos的官方文档) http://docs.c ...

  3. 转:苹果Xcode帮助文档阅读指南

    一直想写这么一个东西,长期以来我发现很多初学者的问题在于不掌握学习的方法,所以,Xcode那么好的SDK文档摆在那里,对他们也起不到什么太大的作用.从论坛.微博等等地方看到的初学者提出的问题,也暴露出 ...

  4. Keras 文档阅读笔记(不定期更新)

    目录 Keras 文档阅读笔记(不定期更新) 模型 Sequential 模型方法 Model 类(函数式 API) 方法 层 关于 Keras 网络层 核心层 卷积层 池化层 循环层 融合层 高级激 ...

  5. Django文档阅读-Day1

    Django文档阅读-Day1 Django at a glance Design your model from djano.db import models #数据库操作API位置 class R ...

  6. Django文档阅读-Day2

    Django文档阅读 - Day2 Writing your first Django app, part 1 You can tell Django is installed and which v ...

  7. Django文档阅读-Day3

    Django文档阅读-Day3 Writing your first Django app, part 3 Overview A view is a "type" of Web p ...

  8. Silverlight类百度文库在线文档阅读器

    百度文库阅读器是基于Flash的,用Silverlight其实也可以做. 我实现的在线阅读器可以应用于内网文档发布,在线阅览审批等.没有过多的堆积功能,专注于核心功能.主要有以下特性: 1. 基于XP ...

  9. 苹果Xcode帮助文档阅读指南

    文档导读 https://developer.apple.com/legacy/library/navigation/ 前面我们讲Xcode的文档结构是在介绍如何能够快速定位到你要找的内容.但是很多人 ...

随机推荐

  1. iOS中 喷枪打字动画的实现

    实现原理比较简单,这里不做过多介绍. #import "ViewController.h" @interface ViewController () @property (weak ...

  2. >/dev/null 2>&1

    >/dev/null 2>&1 大部分在 crontab 计划任务中都会年到未尾带 >/dev/null 2>&1,是什么意思呢? > 是重定向 /dev ...

  3. [asp.net]登录协同工作平台安全解决方案

    [摘要]公司领导说登录验证的安全性如何保证,建议采用UKEY验证类似网银解决,调用第三方YT公司产品. 解决方案: 前端页面: <embed id="s_simnew61" ...

  4. Linux IPC实践(10) --Posix共享内存

    1. 创建/获取一个共享内存 #include <sys/mman.h> #include <sys/stat.h> /* For mode constants */ #inc ...

  5. JAVA之旅(十三)——线程的安全性,synchronized关键字,多线程同步代码块,同步函数,同步函数的锁是this

    JAVA之旅(十三)--线程的安全性,synchronized关键字,多线程同步代码块,同步函数,同步函数的锁是this 我们继续上个篇幅接着讲线程的知识点 一.线程的安全性 当我们开启四个窗口(线程 ...

  6. 《java入门第一季》之面向对象(接口收尾)

    通过案例的形式,结束接口部分. /* 猫狗案例,加入跳高的额外功能 分析:从具体到抽象 猫: 姓名,年龄 吃饭,睡觉 狗: 姓名,年龄 吃饭,睡觉 由于有共性功能,所以,我们抽取出一个父类: 动物: ...

  7. iOS开发:创建真机调试证书步骤(还有一篇是真机测试步骤)(2015年)

    (关于真机测试步骤的blog:http://blog.csdn.net/hbblzjy/article/details/51680282) 1.首先打开苹果的开发者网站(https://develop ...

  8. 漫谈程序员(十八)windows中的命令subst

    漫谈程序员(十八)windows中的命令subst 用法格式 一.subst [盘符] [路径]  将指定的路径替代盘符,该路径将作为驱动器使用 二.subst /d 解除替代 三.不加任何参数键入  ...

  9. STL的容器算法迭代器的设计理念

    1) STL的容器通过类模板技术,实现数据类型和容器模型的分离. 2) STL的迭代器技术实现了遍历容器的统一方法:也为STL的算法提供了统一性. 3) STL的函数对象实现了自定义数据类型的算法运算 ...

  10. saiku中文维度,补充说明

    saiku在筛选中文维度 会出现浏览器白屏 停止响应的现象,经过跟踪源代码,分析原来在linux 操作系统中 数据库读取的中文和界面选取的编码是不一致的 解决方法, classes\saiku-dat ...