Skip to content

Commit 0467557

Browse files
author
Mike Hearing
committed
Adding none Django method
1 parent 74993e4 commit 0467557

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pyrestorm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.1.2'
1+
__version__ = '0.1.3'

pyrestorm/query.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,12 @@ def filter(self, **kwargs):
194194

195195
return clone
196196

197+
def none(self, *args, **kwargs):
198+
'''Imitate an empty `RestQueryset` with no results
199+
'''
200+
return iter([])
201+
197202
def all(self, *args, **kwargs):
203+
'''Unmodified query to return all results in the `RestQueryset`
204+
'''
198205
return self._clone()

0 commit comments

Comments
 (0)