Skip to content

Commit f22e864

Browse files
committed
Port idtracker/sitemaps.py to new schema
- Legacy-Id: 3125
1 parent e12cd7d commit f22e864

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

ietf/idtracker/sitemaps.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# Copyright The IETF Trust 2007, All Rights Reserved
22
#
33
from django.contrib.sitemaps import Sitemap
4+
from django.conf import settings
45
from ietf.idtracker.models import IDInternal, InternetDraft
56

67
class IDTrackerMap(Sitemap):
78
changefreq = "always"
89
def items(self):
9-
return IDInternal.objects.exclude(draft=999999)
10+
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
11+
return IDInternal.objects.all()
12+
else:
13+
return IDInternal.objects.exclude(draft=999999)
1014

1115
class DraftMap(Sitemap):
1216
changefreq = "always"

ietf/urls.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
'nomcom-announcements': NOMCOMAnnouncementsMap,
3737
}
3838

39+
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
40+
del sitemaps['drafts'] # not needed, overlaps sitemaps['idtracker']
41+
3942
urlpatterns = patterns('',
4043
(r'^feed/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
4144
{ 'feed_dict': feeds}),

0 commit comments

Comments
 (0)