pagination header
This commit is contained in:
@@ -11,3 +11,6 @@ def get_all():
|
||||
|
||||
def search(s):
|
||||
return Article.query.filter(Article.title.like("%"+s+"%")).order_by(Article.published_date.desc()).limit(20).all()
|
||||
|
||||
def get_all_page(lim, off):
|
||||
return Article.query.order_by(Article.published_date.desc()).limit(lim).offset(off).all()
|
||||
|
||||
Reference in New Issue
Block a user