online fixes for ruby

This commit is contained in:
uwsgi
2017-02-11 12:48:30 +01:00
parent 621e1ca1ad
commit 49ac42b9a5
8 changed files with 65 additions and 45 deletions

View File

@@ -44,13 +44,13 @@ class ArtController(BaseController):
return Article.query.filter(Article.section_id==section_id).order_by(Article.published_date.desc()).limit(lim).offset(off).all()
def get_section_page(section_id, lim, off):
def get_section_page(self,section_id, lim, off):
return Article.query.filter(Article.section_id==section_id).order_by(Article.published_date.desc()).limit(lim).offset(off).all()
def section_count(section_id):
def section_count(self,section_id):
return Article.query.filter(Article.section_id==section_id).count()
def count():
def count(self):
return Article.query.count()