Created
February 23, 2016 20:03
-
-
Save level09/61c8007f1cd5c8c84d77 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
PER_PAGE = 30 | |
def records_for_page(page=1): | |
return Property.objects.filter.order_by('-date').skip((page-1)*PER_PAGE).limit(PER_PAGE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment