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 @@ ...@@ -36,13 +36,13 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for article in object_list|slice:":10" %} {% for user in object_list %}
<tr id="row_{{article.id}}"> <tr id="row_{{user.id}}">
<td>{{article.id}}</td> <td>{{user.id}}</td>
<td>{{article.username}}</td> <td>{{user.username}}</td>
<td>{{article.email}}</td> <td>{{user.email}}</td>
<td>{{article.date_joined |date:'d/m/Y - H:i:s'}}</td> <td>{{user.date_joined |date:'d/m/Y - H:i:s'}}</td>
<td>{{article.groups.all.0.name}}</td> <td>{{user.groups.all.0.name}}</td>
<td></td> <td></td>
</tr> </tr>
{% endfor %} {% endfor %}
......
...@@ -3,11 +3,14 @@ from django.contrib.auth.models import User ...@@ -3,11 +3,14 @@ from django.contrib.auth.models import User
from django.views.generic.list import ListView from django.views.generic.list import ListView
class UserListView(ListView): class UserListView(ListView):
model = User
paginate_by = 10 paginate_by = 10
template_name = "rp/user_list.html" template_name = "rp/user_list.html"
def get_queryset(self): def get_queryset(self):
return User.objects.all() qs = super().get_queryset()
return qs
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super().get_context_data(**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