Closed dragon-fire-fly closed 1 year ago
This bug was caused by the logged in user being included in the paginator in views.py but excluded in the html template. As a consequence, on the page that WOULD contain the logged in user (in the above example, page 2), the backend sends the data for the card but the template does not render it, resulting in a gap because only 7 cards are rendered.
The following code was adapted to remove the logged in user from the data passed to the Paginator.
original code:
all_users = User.objects.all()
updated code:
all_users = User.objects.all().exclude(pk=request.user.pk)
The paginator is passed the all_users
as an argument and therefore now excludes the logged in user.
paginator = Paginator(all_users, 8)
Describe the bug The paginator for the developer overview page set up in views.py is supposed to render 8 users per page before creating a new page. However, some of the pages only have 7 entries before going to the next page.
To Reproduce Steps to reproduce the behavior:
Expected behavior There should be 8 users per page except the last page where there may be less depending on the number of users in the database
Screenshots Page 1 (8 users displayed) Page 2 (only 7 developers displayed) Page 3 (the remaining users displayed)
Desktop (please complete the following information):