Fixed #14176 -- Added forwards compatibility to the legacy syndication feed view. This allows class-based feeds to be deployed using the old-style feed view, as long as the feed requires no arguments (i.e., get_object returns None). Thanks to psychcf for the report, cwhaines for the investigation, and Andrew Godwin for the assist.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15189 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2011-01-13 14:51:34 +00:00
parent 7b8c38250c
commit 2d352444b0
5 changed files with 79 additions and 6 deletions

View file

@ -1,4 +1,9 @@
from django.conf.urls.defaults import *
from django.contrib.comments.feeds import LatestCommentFeed
feeds = {
'comments': LatestCommentFeed,
}
urlpatterns = patterns('regressiontests.comment_tests.custom_comments.views',
url(r'^post/$', 'custom_submit_comment'),
@ -7,3 +12,7 @@ urlpatterns = patterns('regressiontests.comment_tests.custom_comments.views',
url(r'^approve/(\d+)/$', 'custom_approve_comment'),
)
urlpatterns += patterns('',
(r'^rss/legacy/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
(r'^rss/comments/$', LatestCommentFeed()),
)