Skip to content

Instantly share code, notes, and snippets.

@timbroder
Created October 21, 2011 21:08
Show Gist options
  • Save timbroder/1304981 to your computer and use it in GitHub Desktop.
Save timbroder/1304981 to your computer and use it in GitHub Desktop.
#show latest posts
def Posts(request):
return ListPosts(request, total_posts)
#show posts starting from a certain point
def ListPosts(request, start):
start = total_posts - int(start) + 1
return PostFrom(request, start, show_num)
#show a single post
def Post(request, start):
start = total_posts - int(start) + 1
return PostFrom(request, start, 1)
def PostFrom(request, start, count):
#query for count number of posts starting at the given post
query.max_results = str(count)
query.start_index = str(start)
feed = blogger_service.Get(query.ToUri())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment