Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def recent_posts(update = False):
- key = "recent"
- posts,age = age_get(key)
- if posts is None or update:
- posts = db.GqlQuery("SELECT * FROM Post ORDER BY created DESC LIMIT 10")
- posts = list(posts)
- age_set(key,posts)
- return posts,age
- def recent_posts(update = False,limit = 10):
- key = "recent"
- posts,age = age_get(key)
- if posts is None or update:
- posts = db.GqlQuery("SELECT * FROM Post ORDER BY created" +
- "DESC LIMIT %s" % limit)
- posts = list(posts)
- age_set(key,posts)
- return posts,age
Add Comment
Please, Sign In to add comment