The long-awaited queryset-refactor branch is finally merged with the trunk's main working branch (change r7477). The official documentation for the trunk is also updated on the site. What does this mean for all of us?
The most important thing is, of course, model inheritance . Models can be inherited from each other, while their corresponding tables in the database will refer to each other, respectively.
In this case, the base classes may be abstract (in this case, they will not be created by a separate table, and the fields defined in them will be created in the descendant model table), or they may not be (and then the descendant model table will refer to the base table).
OneToOneField fields no longer automatically create a primary key. Be careful, this change with loss of backward compatibility.
Now Q objects can be used with &, | and ~, and the result will also be a Q-object.
.filter (field = None) (or .filter (field__exact = None)) is now equivalent to .filter (field__isnull = True).
Now QuerySet has an update () method that allows you to change something at once for all the fields corresponding to the QuerySet.
... well, and many more interesting things , but separately it is worth mentioning the underdocumented pleasant bauble - .query and .query.as_sql () for any QuerySets - now it becomes clear which SQL is generated during complex queries ...