Update page split
This commit is contained in:
parent
87c5be2a26
commit
74cfc65501
|
@ -49,7 +49,7 @@ def _get_page(result, elements_every_page, page_index):
|
||||||
page_index = int(page_index)
|
page_index = int(page_index)
|
||||||
total_page = math.ceil(len(result) / float(elements_every_page))
|
total_page = math.ceil(len(result) / float(elements_every_page))
|
||||||
begin = page_index * elements_every_page
|
begin = page_index * elements_every_page
|
||||||
end = min((page_index+1) * elements_every_page, total_page)
|
end = min((page_index+1) * elements_every_page, len(result))
|
||||||
result = result[begin:end]
|
result = result[begin:end]
|
||||||
return result, total_page
|
return result, total_page
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue