Commit ef5501a6 by Czémán Arnold

dashboard: eleminate RequestContext from vm_activity view

Suggestion to eleminate RequestContext: https://docs.djangoproject.com/en/1.11/ref/templates/upgrading/#django-template-loader
parent 0df88258
......@@ -32,7 +32,6 @@ from django.http import (
HttpResponse, Http404, HttpResponseRedirect, JsonResponse
)
from django.shortcuts import redirect, get_object_or_404
from django.template import RequestContext
from django.template.loader import render_to_string
from django.utils.translation import (
ugettext as _, ugettext_noop, ungettext_lazy,
......@@ -1286,15 +1285,15 @@ def vm_activity(request, pk):
response['activities'] = render_to_string(
"dashboard/vm-detail/_activity-timeline.html",
RequestContext(request, context).flatten(),
context, request
)
response['ops'] = render_to_string(
"dashboard/vm-detail/_operations.html",
RequestContext(request, context).flatten(),
context, request
)
response['disk_ops'] = render_to_string(
"dashboard/vm-detail/_disk-operations.html",
RequestContext(request, context).flatten(),
context, request
)
return HttpResponse(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment