Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TAlone
memopol
Commits
9ac4be5d
Commit
9ac4be5d
authored
Dec 21, 2015
by
Jamesie Pic
Browse files
Num_by_page dividable by 3
parent
7a234759
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/utils.py
View file @
9ac4be5d
...
...
@@ -25,7 +25,7 @@ def render_paginate_list(request, object_list, template_name):
"""
Render a paginated list of representatives
"""
pagination_limits
=
(
1
0
,
2
0
,
50
,
100
)
pagination_limits
=
(
1
2
,
2
4
,
48
,
96
)
num_by_page
=
request
.
GET
.
get
(
'limit'
,
unicode
(
pagination_limits
[
0
]))
num_by_page
=
int
(
num_by_page
)
if
num_by_page
.
isdigit
()
else
1
paginator
=
Paginator
(
object_list
,
num_by_page
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment