add where() method to QuerySet
This commit is contained in:
parent
72aa191e70
commit
13afead9fb
2 changed files with 33 additions and 0 deletions
|
|
@ -1397,6 +1397,11 @@ class QuerySet(object):
|
|||
db = _get_db()
|
||||
return db.eval(code, *fields)
|
||||
|
||||
def where(self, where_clause):
|
||||
where_clause = self._sub_js_fields(where_clause)
|
||||
self._where_clause = where_clause
|
||||
return self
|
||||
|
||||
def sum(self, field):
|
||||
"""Sum over the values of the specified field.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue