Skip to content

Instantly share code, notes, and snippets.

@ajrouvoet
Created January 16, 2014 11:07
Show Gist options
  • Save ajrouvoet/8453148 to your computer and use it in GitHub Desktop.
Save ajrouvoet/8453148 to your computer and use it in GitHub Desktop.
pageno = int( request.GET.get( 'page' )) - 1
page = pbatches[ PBATCH_PAGE_SIZE*pageno : PBATCH_PAGE_SIZE*(pageno+1) ]
has_next = len( pbatches ) >= PBATCH_PAGE_SIZE*(pageno+1)
has_prev= pageno > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment