Created
October 21, 2011 21:08
-
-
Save timbroder/1304981 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
#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