db.models.query.QuerySet.filter()

filter(**kwargs)

Returns a new QuerySet containing objects that match the given lookup parameters.

The lookup parameters (**kwargs) should be in the format described in Field lookups below. Multiple parameters are joined via AND in the underlying SQL statement.

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

doc_Django
2016-10-09 18:36:10
Comments
Leave a Comment

Please login to continue.