Opened 12 years ago
Closed 12 years ago
#20087 closed Uncategorized (duplicate)
RSS updating issue
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.syndication | Version: | 1.4 |
Severity: | Normal | Keywords: | RSS updating |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Hi, some RSS readers cannot update the latest post because of the Last-Modified header not shown in Django version < 1.5. I find Django1.5 has fix this issue. Can you also make this in Django1.4(or even 1.3)?
Please refer to the code below:
class Feed(object):
...
def call(self, request, *args, kwargs):
try:
obj = self.get_object(request, *args, kwargs)
except ObjectDoesNotExist:
raise Http404('Feed object does not exist.')
feedgen = self.get_feed(obj, request)
response = HttpResponse(mimetype=feedgen.mime_type)
if hasattr(self, 'item_pubdate'):
# if item_pubdate is defined for the feed, set header so as
# ConditionalGetMiddleware is able to send 304 NOT MODIFIED
responseLast-Modified = http_date(
timegm(feedgen.latest_post_date().utctimetuple()))
feedgen.write(response, 'utf-8')
return response
Hi, Django 1.4 only receives only security updates. I doubt this feature will be back-ported. The ticket referenced while implementing the requested features seems to be #7936.