diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2011-01-13 14:51:34 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2011-01-13 14:51:34 +0000 |
| commit | 2d352444b0354f163ac7d04fcddf84cc744a09d8 (patch) | |
| tree | 65a8fa4100fdc38f1a1e89b27852c466d454b9b5 /docs | |
| parent | 7b8c38250ce812c67bc85f454092c74ad5b81339 (diff) | |
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
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/comments/example.txt | 29 |
1 files changed, 23 insertions, 6 deletions
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<url>.*)/$', '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<url>.*)/$', 'django.contrib.syndication.views.feed', + {'feed_dict': feeds}), + # ... + ) + + Moderation ========== |
