Commit e2ce7d07 by Miles Richardson Committed by GitHub

Merge pull request #105 from kashif/patch-1

added keys() queryset function
parents 9fce3b0d e9fee34e
...@@ -152,6 +152,11 @@ class Queryset(object): ...@@ -152,6 +152,11 @@ class Queryset(object):
q._options['skip'] = int(value) q._options['skip'] = int(value)
return q return q
def keys(self, *fields):
q = copy.deepcopy(self)
q._options['keys'] = ','.join(fields)
return q
def order_by(self, order, descending=False): def order_by(self, order, descending=False):
q = copy.deepcopy(self) q = copy.deepcopy(self)
# add a minus sign before the order value if descending == True # add a minus sign before the order value if descending == True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment