summaryrefslogtreecommitdiffstats
path: root/packages/views/signoff.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-07-24 16:35:55 +0200
committerDan McGee <dan@archlinux.org>2012-07-25 02:57:20 +0200
commit76c37ce3acc7a4af0271c7535d4a33042f7749b5 (patch)
tree4156207a4631dd28d4803d6305dc51bb8388e6db /packages/views/signoff.py
parentc0bf9e20660cfae7ea8994472555bba23398b598 (diff)
downloadarchweb-76c37ce3acc7a4af0271c7535d4a33042f7749b5.tar.gz
archweb-76c37ce3acc7a4af0271c7535d4a33042f7749b5.tar.xz
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 'packages/views/signoff.py')
-rw-r--r--packages/views/signoff.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/views/signoff.py b/packages/views/signoff.py
index 7aa3910..56eb060 100644
--- a/packages/views/signoff.py
+++ b/packages/views/signoff.py
@@ -10,7 +10,6 @@ from django.http import HttpResponse, Http404
from django.shortcuts import get_list_or_404, redirect, render
from django.utils.timezone import now
from django.views.decorators.cache import never_cache
-from django.views.generic.simple import direct_to_template
from main.models import Package, Arch, Repo
from ..models import SignoffSpecification, Signoff
@@ -28,7 +27,7 @@ def signoffs(request):
'arches': Arch.objects.all(),
'repo_names': sorted(set(g.target_repo for g in signoff_groups)),
}
- return direct_to_template(request, 'packages/signoffs.html', context)
+ return render(request, 'packages/signoffs.html', context)
@permission_required('main.change_package')
@never_cache
@@ -144,7 +143,7 @@ def signoff_options(request, name, repo, arch):
'package': package,
'form': form,
}
- return direct_to_template(request, 'packages/signoff_options.html', context)
+ return render(request, 'packages/signoff_options.html', context)
class SignoffJSONEncoder(DjangoJSONEncoder):
'''Base JSONEncoder extended to handle all serialization of all classes