Permalink
Browse files

limit the number of posts shown

  • Loading branch information...
1 parent 0ee6cdf commit c72e450b76d413a542aa1bef90c31fe525406863 Jeff Lindsay committed Mar 8, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 bin.py
  2. +1 −1 index.yaml
View
2 bin.py
@@ -7,7 +7,7 @@
class BinHandler(webapp.RequestHandler):
def get(self):
bin = self._get_bin()
- posts = bin.post_set.order('-created')
+ posts = bin.post_set.order('-created').fetch(50)
request = self.request
self.response.out.write(template.render('templates/bin.html', {'bin':bin, 'posts':posts, 'request':request}))
View
2 index.yaml
@@ -16,7 +16,7 @@ indexes:
- name: bin
- name: created
-# Used once in query history.
+# Used 4 times in query history.
- kind: Post
properties:
- name: bin

0 comments on commit c72e450

Please sign in to comment.