Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
rpteam
Revue de Press
Commits
9f0e8e24
Verified
Commit
9f0e8e24
authored
Oct 18, 2017
by
Thibaut Broggi
Browse files
Change number of users displayed per page to 20
parent
777536fa
Pipeline
#1431
passed with stages
in 1 minute and 53 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/rp/templates/rp/user_list.html
View file @
9f0e8e24
...
...
@@ -36,13 +36,13 @@
</tr>
</thead>
<tbody>
{% for
article
in object_list
|slice:":10"
%}
<tr
id=
"row_{{
article
.id}}"
>
<td>
{{
article
.id}}
</td>
<td>
{{
article
.username}}
</td>
<td>
{{
article
.email}}
</td>
<td>
{{
article
.date_joined |date:'d/m/Y - H:i:s'}}
</td>
<td>
{{
article
.groups.all.0.name}}
</td>
{% for
user
in object_list %}
<tr
id=
"row_{{
user
.id}}"
>
<td>
{{
user
.id}}
</td>
<td>
{{
user
.username}}
</td>
<td>
{{
user
.email}}
</td>
<td>
{{
user
.date_joined |date:'d/m/Y - H:i:s'}}
</td>
<td>
{{
user
.groups.all.0.name}}
</td>
<td></td>
</tr>
{% endfor %}
...
...
apps/rp/views/users.py
View file @
9f0e8e24
...
...
@@ -3,11 +3,14 @@ from django.contrib.auth.models import User
from
django.views.generic.list
import
ListView
class
UserListView
(
ListView
):
model
=
User
paginate_by
=
10
template_name
=
"rp/user_list.html"
def
get_queryset
(
self
):
return
User
.
objects
.
all
()
qs
=
super
().
get_queryset
()
return
qs
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
().
get_context_data
(
**
kwargs
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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