00_UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: # <class 'django.contrib.auth.models.Group'> QuerySet.

访问groups时,后端报警告

UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list:      # <class 'django.contrib.auth.models.Group'> QuerySet.

 

参考blog

https://www.cnblogs.com/zhengyionline/p/9232491.html

看到,其实是未排序

 

方法1:view中取queryset对象实例时

 

 方法2:models中ordery

 

 

 

 

修改后即可

 

posted @ 2019-12-08 20:49  venicid  阅读(205)  评论(0编辑  收藏  举报