In Django 1.2, feed_dict was deprecated.

Therefore, change this to use the method explained at:

https://docs.djangoproject.com/en/dev/releases/1.2/#feed-in-django-contrib-syndication-feeds
This commit is contained in:
Bradley M. Kuhn 2014-07-14 10:49:29 -04:00
parent f18e922cf8
commit 6a2918c288
2 changed files with 3 additions and 10 deletions

View file

@ -238,13 +238,6 @@ class BlogFeed(ConservancyFeedBase):
return queryset.order_by('-pub_date')[:10]
feed_dict = {
'blog': BlogFeed,
'news': PressReleaseFeed,
'omnibus': OmnibusFeed,
# 'event-media': RecentEventMediaFeed,
}
# make each feed know its canonical url
for k, v in feed_dict.items():
v.get_absolute_url = '/feeds/%s/' % k

View file

@ -28,9 +28,9 @@ admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/(.*)', admin.site.urls),
(r'^$', 'conservancy.frontpage.view'),
(r'^feeds/(?P<url>.*)/?$', 'django.contrib.syndication.views.Feed',
{'feed_dict': feed_dict}),
(r'^feeds/blog/?$', 'django.contrib.syndication.views.Feed', BlogFeed()),
(r'^feeds/news/?$', 'django.contrib.syndication.views.Feed', PressReleaseFeed()),
(r'^feeds/omnibus/?$', 'django.contrib.syndication.views.Feed', OmnibusFeed()),
(r'^feeds/?$', 'conservancy.feeds.view'),
(r'^news(/|$)', include('conservancy.apps.news.urls')),
(r'^blog(/|$)', include('conservancy.apps.blog.urls')),