Fixed RSSView

This commit is contained in:
Felipe Martín 2016-04-09 11:48:28 +02:00
parent e1d82b5634
commit bb8ebf13b6
1 changed files with 2 additions and 8 deletions

View File

@ -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')