1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #26290 -- Warned that paginating an unordered QuerySet may result in inconsistent results.

This commit is contained in:
Emad Mokhtar
2016-06-07 14:24:19 +03:00
committed by Tim Graham
parent 724dd2043e
commit c4980e28e5
5 changed files with 38 additions and 13 deletions

View File

@@ -27,7 +27,7 @@ class SimpleI18nSitemap(Sitemap):
i18n = True
def items(self):
return I18nTestModel.objects.all()
return I18nTestModel.objects.order_by('pk').all()
class EmptySitemap(Sitemap):
@@ -115,7 +115,7 @@ sitemaps_lastmod_descending = OrderedDict([
])
generic_sitemaps = {
'generic': GenericSitemap({'queryset': TestModel.objects.all()}),
'generic': GenericSitemap({'queryset': TestModel.objects.order_by('pk').all()}),
}