Fixed RSSView
This commit is contained in:
parent
e1d82b5634
commit
bb8ebf13b6
|
@ -4,8 +4,6 @@ import json
|
|||
from django.core.urlresolvers import reverse
|
||||
from django.http import Http404, HttpResponseRedirect, HttpResponse
|
||||
from django.shortcuts import render
|
||||
from django.template.loader import get_template
|
||||
from django.template import RequestContext
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
||||
|
@ -139,9 +137,5 @@ class RSSView(View):
|
|||
items = blog_utils.get_posts(limit=limit)
|
||||
self.data['items'] = items
|
||||
|
||||
context = RequestContext(request, self.data)
|
||||
template = get_template(self.template)
|
||||
return HttpResponse(
|
||||
template.render(context),
|
||||
content_type='text/xml'
|
||||
)
|
||||
return render(request, self.template, self.data,
|
||||
content_type='text/xml')
|
||||
|
|
Loading…
Reference in New Issue