主要集中在新特性上。

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. Xcode中Groups和Folder的区别

    以前一直没有在意这个问题,今天"中奖"了 ;( 在Xcode文件夹视图中会发现2种颜色的文件夹图标:黄色和蓝色. 黄色表示组(groups),蓝色表示文件夹(folder). 组只 ...

  2. Java-IO之总框架

    在Java IO中我们会经常提到输入流和输出流,流是一种抽象的数据总称,本质是能够进行数据的传输.按照流的方向分为:输入流和输出流.按照流中处理数据的单位,可以将其区分为:字节流和字符流.在Java中 ...

  3. pig强制转换(字符到整数):首位0怎么处理,‘01’到1的转化,

    pig支持的类型转换(cast) Pig Latin supports casts as shown in this table. from / to bag tuple map int long f ...

  4. 软考之路--J2SE,从HelloWorld到传世代码

    "Hello World"程序指的是只在计算机屏幕上输出"Hello, World!"(意为"世界,你好!")这行字符串的计算机程序.hel ...

  5. 4.2、Libgdx各个模块概览

    (原文:http://www.libgdx.cn/topic/34/4-2-libgdx%E5%90%84%E4%B8%AA%E6%A8%A1%E5%9D%97%E6%A6%82%E8%A7%88) ...

  6. 高性能C++网络库libtnet实现:http

    HTTP libtnet提供了简单的http支持,使用也很简单. 一个简单的http server: void onHandler(const HttpConnectionPtr_t& con ...

  7. shell脚本格式的几点注意:格式严格,空格不能随便出现(一写就记不住)

    shell脚本中,不能随意添加空格,否则出错: 1,=等号两边必须无空格.否则出错.如i =$1和i= $1都是错的.但是在()内部不限制如for ((i= 1;i < 3;i= i+1))是正 ...

  8. 如何反编译APK?

    1.概述 一些商业的app都包含很多精美的图片还有一些比较好的配置文件,以前某师兄就说过apk把后缀改为zip,然后解压一下就可以获得很多图片资源,但是这时候你打开一下解压出来的xml资源全是乱码.通 ...

  9. 好看的dialog,sweet Alert Dialog 导入Android Studio

    系统自带的dialog实在是丑到无法忍受.所以找到了一款比较好的第三方dialog. github 地址如下:https://github.com/pedant/sweet-alert-dialog ...

  10. ANN实现

    ANN核心数据结构: typedef struct  {     int input_n;                  /* number of input units */     int h ...