Change number of users displayed per page to 20

parent 777536fa
Pipeline #1431 passed with stages
in 1 minute and 53 seconds
......@@ -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 %}
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment