summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2008-03-19 22:34:40 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2008-03-19 22:34:40 +0000
commitbb2e395af77661de650fa8d6d7cd593768c94e30 (patch)
treef6d4351679c56f252dd2f9999e423bafabdc15de
parent4457ba002d64d4a991b0561c5be69a8c61b2b828 (diff)
Fixed #5107: swapped in RequestContext for Context in syndication feeds. Thanks, peter@mymart.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/syndication/feeds.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/django/contrib/syndication/feeds.py b/django/contrib/syndication/feeds.py
index 3b2dd60aa0..85af79cc27 100644
--- a/django/contrib/syndication/feeds.py
+++ b/django/contrib/syndication/feeds.py
@@ -3,7 +3,8 @@ from django.template import Context, loader, Template, TemplateDoesNotExist
from django.contrib.sites.models import Site, RequestSite
from django.utils import feedgenerator
from django.utils.encoding import smart_unicode, iri_to_uri
-from django.conf import settings
+from django.conf import settings
+from django.template import RequestContext
def add_domain(domain, url):
if not (url.startswith('http://') or url.startswith('https://')):
@@ -124,9 +125,9 @@ class Feed(object):
else:
author_email = author_link = None
feed.add_item(
- title = title_tmp.render(Context({'obj': item, 'site': current_site})),
+ title = title_tmp.render(RequestContext(self.request, {'obj': item, 'site': current_site})),
link = link,
- description = description_tmp.render(Context({'obj': item, 'site': current_site})),
+ description = description_tmp.render(RequestContext(self.request, {'obj': item, 'site': current_site})),
unique_id = self.__get_dynamic_attr('item_guid', item, link),
enclosure = enc,
pubdate = self.__get_dynamic_attr('item_pubdate', item),