Orm operation of the database django

django orm support operations based on the data model. Which is special operator,>, <=, etc. by a symbol gt, lt, etc. in place. Its query mode: field - comparison operator.

Query filter: filter, aggregate, exclude,
condition or when the need to use the object Q corresponding symbol & | ~.
Multi-field comparison, the need to use F object
associated with the query:
access multi-multi class name __set.all (); party access, direct foreign keys.
Associated filter query:
the query is a party, to use foreign key - field - comparison operator
query is in many ways, Syntax: multi-class name in lowercase - field

Guess you like

Origin www.cnblogs.com/xuehaiwuya0000/p/11223121.html