Last active
June 7, 2019 16:18
-
-
Save goutomroy/77042f82b64da9a3c5d62f2dba36e643 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You can't use filter to queryset anymore. | |
queryset = Entry.objects.all()[10:100] | |
# You can use filter to q1 but not to q2, q3. | |
q1 = Entry.objects.all() | |
q2 = q1[1:10] | |
q3 = q2[1:5] | |
# saves results to cache of q1 | |
lst1 = [each.blog.id for each in q1] | |
# saves results to cache of q2 | |
lst2 = [each.blog.id for each in q2] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment