count fix 2
This commit is contained in:
@@ -24,12 +24,14 @@ def index():
|
||||
pp,o=controller.pagination_params(v) # extract per_page and offset from params
|
||||
if v.has_key("section_id"):
|
||||
articles=controller.get_section_page(int(v["section_id"]),pp,o)
|
||||
c=controller.section_count(int(v["section_id"]))
|
||||
else:
|
||||
articles=controller.get_all_page(pp,o)
|
||||
c=controller.count()
|
||||
resp = jsonify(articles=articles)
|
||||
resp.headers['Pagination-Limit']=pp
|
||||
resp.headers['Pagination-Offset']=o
|
||||
resp.headers['Pagination-TotalCount']=controller.count()
|
||||
resp.headers['Pagination-TotalCount']=c
|
||||
return resp
|
||||
|
||||
@article_pages.route("/<int:id>",methods=['PUT'])
|
||||
|
||||
Reference in New Issue
Block a user