From 2d352444b0354f163ac7d04fcddf84cc744a09d8 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 13 Jan 2011 14:51:34 +0000 Subject: 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 --- docs/ref/contrib/comments/example.txt | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/ref/contrib/comments/example.txt b/docs/ref/contrib/comments/example.txt index 424bdb13f5..921fe03ffa 100644 --- a/docs/ref/contrib/comments/example.txt +++ b/docs/ref/contrib/comments/example.txt @@ -143,19 +143,36 @@ enable it in your project's ``urls.py``: from django.conf.urls.defaults import * from django.contrib.comments.feeds import LatestCommentFeed - feeds = { - 'latest': LatestCommentFeed, - } - urlpatterns = patterns('', # ... - (r'^feeds/(?P.*)/$', 'django.contrib.syndication.views.feed', - {'feed_dict': feeds}), + (r'^feeds/latest/$', LatestCommentFeed()), # ... ) Now you should have the latest comment feeds being served off ``/feeds/latest/``. +.. versionchanged:: 1.3 + +Prior to Django 1.3, the LatestCommentFeed was deployed using the +syndication feed view: + +.. code-block:: python + + from django.conf.urls.defaults import * + from django.contrib.comments.feeds import LatestCommentFeed + + feeds = { + 'latest': LatestCommentFeed, + } + + urlpatterns = patterns('', + # ... + (r'^feeds/(?P.*)/$', 'django.contrib.syndication.views.feed', + {'feed_dict': feeds}), + # ... + ) + + Moderation ========== -- cgit v1.3