we don't really want to get all the posts. so limit it to just 3 for now
This commit is contained in:
parent
99035ffe8c
commit
d8d6d2cf20
|
@ -82,7 +82,7 @@ def index(page=1):
|
||||||
@app.route('/allposts', methods=['GET', 'POST'])
|
@app.route('/allposts', methods=['GET', 'POST'])
|
||||||
def allposts():
|
def allposts():
|
||||||
form = PostForm()
|
form = PostForm()
|
||||||
posts = Post.query.all()
|
posts = Post.query.limit(3)
|
||||||
return render_template('allposts.html',
|
return render_template('allposts.html',
|
||||||
title='allposts',
|
title='allposts',
|
||||||
form=form,
|
form=form,
|
||||||
|
|
Loading…
Reference in New Issue