limit to 20 by default

pull/16/head
posativ 12 years ago
parent 6bb7b8c8d9
commit 66cc7911f5

@ -61,7 +61,7 @@
<span class="limit">
[ <a href="?${query(pendinglimit=10)}">10</a>
| <a href="?${query(pendinglimit=20)}">20</a>
| <a href="?${query(pendinglimit=0)}">All</a> ]
| <a href="?${query(pendinglimit=100000)}">All</a> ]
</span>
% for comment in app.db.recent(limit=get('pendinglimit', int), mode=2):
@ -74,10 +74,10 @@
<span class="limit">
[<a href="?${query(recentlimit=10)}">10</a>
| <a href="?${query(recentlimit=20)}">20</a>
| <a href="?${query(recentlimit=0)}">All</a>]
| <a href="?${query(recentlimit=100000)}">All</a>]
</span>
% for comment in app.db.recent(limit=get('recentlimit', int), mode=5):
% for comment in app.db.recent(limit=get('recentlimit', int) or 20, mode=5):
${make(comment)}
% endfor

@ -94,8 +94,8 @@ class TestComments(unittest.TestCase):
def testDeleteWithReference(self):
client = Client(self.app, Response)
resp = client.post('/1.0/path/new', data=json.dumps(comment(text='First')))
self.post('/1.0/path/new', data=json.dumps(comment(text='Second', parent=1)))
client.post('/1.0/path/new', data=json.dumps(comment(text='First')))
client.post('/1.0/path/new', data=json.dumps(comment(text='First', parent=1)))
r = client.delete('/1.0/path/1')
assert r.status_code == 200

Loading…
Cancel
Save