summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-09-14 15:29:10 -0400
committerTim Graham <timograham@gmail.com>2015-09-14 15:30:01 -0400
commit64d7a553e1be20174b0aa2882111049abf392d4f (patch)
treeb9a74615ca51e494ce7894bba2a870ddd5376fee
parent83ea3bc798a87098e6507450e7db610020eb215e (diff)
Fixed #25369 -- Corrected syndication's get_object() example.
-rw-r--r--docs/ref/contrib/syndication.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/ref/contrib/syndication.txt b/docs/ref/contrib/syndication.txt
index 8da4073b97..4d0e3da100 100644
--- a/docs/ref/contrib/syndication.txt
+++ b/docs/ref/contrib/syndication.txt
@@ -225,13 +225,12 @@ method along with the request object.
Here's the code for these beat-specific feeds::
from django.contrib.syndication.views import Feed
- from django.shortcuts import get_object_or_404
class BeatFeed(Feed):
description_template = 'feeds/beat_description.html'
def get_object(self, request, beat_id):
- return get_object_or_404(Beat, pk=beat_id)
+ return Beat.objects.get(pk=beat_id)
def title(self, obj):
return "Police beat central: Crimes for beat %s" % obj.beat