Last active
August 29, 2015 14:03
-
-
Save dangayle/e0e3d167bc627a68e93b to your computer and use it in GitHub Desktop.
Paging function
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
def seq_range(page=1, prange=10): | |
"""Get a range of numbers for paging""" | |
start = page * prange - prange | |
end = start + prange - 1 | |
print start, end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment