summaryrefslogtreecommitdiffstats
path: root/todolists
diff options
context:
space:
mode:
authorDusty Phillips <buchuki@gmail.com>2008-06-27 22:50:01 +0200
committerDusty Phillips <buchuki@gmail.com>2008-06-27 22:50:01 +0200
commitc1d28bce3353b3d76d59e22761cf21b710dd1bc4 (patch)
tree273e01e98032366497e0196e0baf43d84914210d /todolists
parent454d7cf255c5b9732d8d43221cb488af764fbcbd (diff)
downloadarchweb-c1d28bce3353b3d76d59e22761cf21b710dd1bc4.tar.gz
archweb-c1d28bce3353b3d76d59e22761cf21b710dd1bc4.tar.xz
use a nicer decorator
Diffstat (limited to 'todolists')
-rw-r--r--todolists/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/todolists/views.py b/todolists/views.py
index 3a96dc8..2a7d1f0 100644
--- a/todolists/views.py
+++ b/todolists/views.py
@@ -1,6 +1,6 @@
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404
-from django.contrib.auth.decorators import user_passes_test
+from django.contrib.auth.decorators import permission_required
from django.contrib.auth.models import User
from archweb_dev.main.utils import render_response
from archweb_dev.main.models import Todolist, TodolistPkg, Package
@@ -32,7 +32,7 @@ def list(request):
list=l.id,complete=False).count() == 0
return render_response(request, 'todolists/list.html', {'lists':lists})
-@user_passes_test(lambda u: u.has_perm('todolists.add_todolist'))
+@permission_required('todolists.add_todolist')
def add(request):
if request.POST:
try: