summaryrefslogtreecommitdiff
path: root/visualize
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-07-24 09:35:55 -0500
committerDan McGee <dan@archlinux.org>2012-07-24 19:57:20 -0500
commit76c37ce3acc7a4af0271c7535d4a33042f7749b5 (patch)
tree4156207a4631dd28d4803d6305dc51bb8388e6db /visualize
parentc0bf9e20660cfae7ea8994472555bba23398b598 (diff)
Replace deprecated direct_to_template() with render() shortcut
Now that Django actually provides a concise way to use a RequestContext object without instantiating it, we can use that rather than the old function-based generic view that worked well to do the same. Additionally, these function-based generic views will be gone in Django 1.5, so might as well make the move now. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'visualize')
-rw-r--r--visualize/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/visualize/views.py b/visualize/views.py
index 95f8c314..44e60472 100644
--- a/visualize/views.py
+++ b/visualize/views.py
@@ -4,14 +4,14 @@ import json
from django.contrib.auth.models import User
from django.db.models import Count, Sum, Q
from django.http import HttpResponse
+from django.shortcuts import render
from django.views.decorators.cache import cache_page
-from django.views.generic.simple import direct_to_template
from main.models import Package, Arch, Repo
from devel.models import MasterKey, PGPSignature
def index(request):
- return direct_to_template(request, 'visualize/index.html', {})
+ return render(request, 'visualize/index.html')
def arch_repo_data():
qs = Package.objects.select_related().values(