Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
La Quadrature du Net
rpteam
rp
Commits
9f0e8e24
Verified
Commit
9f0e8e24
authored
Oct 18, 2017
by
Thibaut Broggi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
apps/rp/templates/rp/user_list.html
apps/rp/templates/rp/user_list.html
+7
-7
apps/rp/views/users.py
apps/rp/views/users.py
+4
-1
No files found.
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
Markdown
is supported
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