diff --git a/oxdata/oxdjango/api/views.py b/oxdata/oxdjango/api/views.py index b7249ab..89be4f0 100644 --- a/oxdata/oxdjango/api/views.py +++ b/oxdata/oxdjango/api/views.py @@ -3,8 +3,7 @@ from __future__ import division, absolute_import import json -from django.shortcuts import render_to_response -from django.template import RequestContext +from django.shortcuts import render from django.conf import settings from ..shortcuts import render_to_json_response, json_response, HttpErrorJson @@ -25,12 +24,12 @@ def api(request): for f in sorted(methods): api.append({'name': f, 'doc': actions.doc(f).replace('\n', '
\n')}) - context = RequestContext(request, { + context = { 'api': api, 'settings': settings, 'sitename': settings.SITENAME - }) - response = render_to_response('api.html', context) + } + response = render(request, 'api.html', context) response['Access-Control-Allow-Origin'] = '*' return response if request.META.get('CONTENT_TYPE') == 'application/json':