UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class ‘myapp.models.Power’> QuerySet.
paginator = self.django_paginator_class(queryset, page_size)
The reason is that you are not sorting.
Solution.
(a) add ordering to the design of the model
class test(models.Model):
...
class Meta:
...
ordering=["xx"]
(b) Add order_by to the query set for sorting
Read More:
- error C4996: ‘pcl::SAC_SAMPLE_SIZE‘ [How to Solve]
- Solution of Hibernate paging report only entering result set and not supporting requested operation
- Angularjs1 exception error:[$injector:unpr]
- [How to Fix]Type error: must use keyword argument for key function
- Type error: must use keyword argument for key function
- [Solved] MindSpore Error: “RuntimeError: Invalid data, Page size.”
- [Cadence Allegro PCB Design] error: Possible pin type conflict GND/VCC Power Connected to Output
- Vscode pylint reported an error of “no member”, but it is running normally
- Creating test database for alias ‘postgres’… Got an error creating the test database: permission
- [Solved] Triton-inference-server Start Error: Internal – failed to load all models
- [Solved] TensorFlow severing Container Creat Error: failed: Out of range: Read less bytes than requested
- [Solved] FreeBSD PKG error: pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
- [Solved] Error: Django is not importable in this environment
- Laravel model save if the table has no ID field Error [How to Solve]
- feign.FeignException: status 404 reading XXXClient#XXMethod(String)
- [Solved] Tensorflow error or keras error and tf.keras error: oom video memory is insufficient
- Android studio does not prompt error messages [How to Solve]
- Android Error: META-INF/DEPENDENCIES [How to Solve]
- Template cannot be rendered due to the joint query of populate in mongoose: syntax error: unexpected token r in JSON at position 0
- Internalerror: GPU sync failed error (How to Solve)