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

Fixed #30159 -- Removed unneeded use of OrderedDict.

Dicts preserve order since Python 3.6.
This commit is contained in:
Nick Pope
2019-02-05 11:22:08 +00:00
committed by Tim Graham
parent 21bb71ef0d
commit 24b82cd201
31 changed files with 201 additions and 287 deletions

View File

@@ -1,4 +1,3 @@
from collections import OrderedDict
from datetime import date, datetime
from django.conf.urls.i18n import i18n_patterns
@@ -102,27 +101,27 @@ fixed_lastmod__mixed_sitemaps = {
'fixed-lastmod-mixed': FixedLastmodMixedSitemap,
}
sitemaps_lastmod_mixed_ascending = OrderedDict([
('no-lastmod', EmptySitemap),
('lastmod', FixedLastmodSitemap),
])
sitemaps_lastmod_mixed_ascending = {
'no-lastmod': EmptySitemap,
'lastmod': FixedLastmodSitemap,
}
sitemaps_lastmod_mixed_descending = OrderedDict([
('lastmod', FixedLastmodSitemap),
('no-lastmod', EmptySitemap),
])
sitemaps_lastmod_mixed_descending = {
'lastmod': FixedLastmodSitemap,
'no-lastmod': EmptySitemap,
}
sitemaps_lastmod_ascending = OrderedDict([
('date', DateSiteMap),
('datetime', FixedLastmodSitemap),
('datetime-newer', FixedNewerLastmodSitemap),
])
sitemaps_lastmod_ascending = {
'date': DateSiteMap,
'datetime': FixedLastmodSitemap,
'datetime-newer': FixedNewerLastmodSitemap,
}
sitemaps_lastmod_descending = OrderedDict([
('datetime-newer', FixedNewerLastmodSitemap),
('datetime', FixedLastmodSitemap),
('date', DateSiteMap),
])
sitemaps_lastmod_descending = {
'datetime-newer': FixedNewerLastmodSitemap,
'datetime': FixedLastmodSitemap,
'date': DateSiteMap,
}
generic_sitemaps = {
'generic': GenericSitemap({'queryset': TestModel.objects.order_by('pk').all()}),