diff options
| author | Tim Graham <timograham@gmail.com> | 2015-09-14 15:29:10 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-09-14 15:30:31 -0400 |
| commit | 8388f24e79ba9d19c98652775e3f0f27ad23914e (patch) | |
| tree | 47e118f4789a27a86969b4a8dc7cd9dcb814b2ac /docs | |
| parent | d0d25671207bd421adff1dd88605e93ffc00f51f (diff) | |
[1.8.x] Fixed #25369 -- Corrected syndication's get_object() example.
Backport of 64d7a553e1be20174b0aa2882111049abf392d4f from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/syndication.txt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/docs/ref/contrib/syndication.txt b/docs/ref/contrib/syndication.txt index 9ef42b5e10..002cafec0b 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 |
