Changes between Version 4 and Version 6 of Ticket #34067


Ignore:
Timestamp:
Oct 3, 2022, 1:43:46 AM (2 years ago)
Author:
Hristo Trendafilov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34067 – Description

    v4 v6  
    83834. call again the {{{page = paginator.page(page_number)}}}
    8484
    85 P.S. That is also happening in django 2.2
     85
     86It is Django fault for those reasons:
     87
     88* `order_by` might be complicated but is supported by the framework
     89* Chained `order_by` is also supported
     90* queryset slicing is a feature of Django queryset API.
     91* queryset slicing should act like list and string slicing and namely to provide you with results `[ from : to ]` indexes provided and not to change or lose data in between. Or in other words - what is passed in the `Paginator.object_list` should be just sliced `[ from : to ]`. `Paginator` should never care for the queryset, what is the ordering of the queryset, what is excluded and so on - it should just work with it.
     92* changing `paginate_by` to `10` or greater fixes the problem. `paginate_by` is a standard and documented Django ListView setting.
     93* changing `order_by` to some other `order_by` also fixes the problem. `order_by` should work the same or if any limitations those should be well documented
     94* removing `order_by` also fixes the problem.
     95
     96P.S. That is also happening in Django 2.2
Back to Top