Port idtracker/sitemaps.py to new schema
- Legacy-Id: 3125
This commit is contained in:
parent
e12cd7d662
commit
f22e864d62
ietf
|
@ -1,12 +1,16 @@
|
|||
# Copyright The IETF Trust 2007, All Rights Reserved
|
||||
#
|
||||
from django.contrib.sitemaps import Sitemap
|
||||
from django.conf import settings
|
||||
from ietf.idtracker.models import IDInternal, InternetDraft
|
||||
|
||||
class IDTrackerMap(Sitemap):
|
||||
changefreq = "always"
|
||||
def items(self):
|
||||
return IDInternal.objects.exclude(draft=999999)
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
return IDInternal.objects.all()
|
||||
else:
|
||||
return IDInternal.objects.exclude(draft=999999)
|
||||
|
||||
class DraftMap(Sitemap):
|
||||
changefreq = "always"
|
||||
|
|
|
@ -36,6 +36,9 @@ sitemaps = {
|
|||
'nomcom-announcements': NOMCOMAnnouncementsMap,
|
||||
}
|
||||
|
||||
if settings.USE_DB_REDESIGN_PROXY_CLASSES:
|
||||
del sitemaps['drafts'] # not needed, overlaps sitemaps['idtracker']
|
||||
|
||||
urlpatterns = patterns('',
|
||||
(r'^feed/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
|
||||
{ 'feed_dict': feeds}),
|
||||
|
|
Loading…
Reference in a new issue