From 751ac09698cb58afddb3e726a29438646777e877 Mon Sep 17 00:00:00 2001 From: eliott Date: Wed, 9 Apr 2008 22:43:07 -0700 Subject: Removed login_required from the individual views. Not entire dev site requires login. --- todolists/views.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'todolists') diff --git a/todolists/views.py b/todolists/views.py index fe8b1d42..3a96dc87 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 login_required, user_passes_test +from django.contrib.auth.decorators import user_passes_test from django.contrib.auth.models import User from archweb_dev.main.utils import render_response from archweb_dev.main.models import Todolist, TodolistPkg, Package @@ -10,7 +10,6 @@ import django.db IntegrityError = django.db.backend.Database.IntegrityError -@login_required def flag(request, listid, pkgid): list = get_object_or_404(Todolist, id=listid) pkg = get_object_or_404(TodolistPkg, id=pkgid) @@ -18,7 +17,6 @@ def flag(request, listid, pkgid): pkg.save() return HttpResponseRedirect('/todo/%s/' % (listid)) -@login_required def view(request, listid): list = get_object_or_404(Todolist, id=listid) pkgs = TodolistPkg.objects.filter(list=list.id).order_by('pkg') @@ -27,7 +25,6 @@ def view(request, listid): 'todolists/view.html', {'list':list,'pkgs':pkgs}) -@login_required def list(request): lists = Todolist.objects.order_by('-date_added') for l in lists: @@ -35,7 +32,6 @@ def list(request): list=l.id,complete=False).count() == 0 return render_response(request, 'todolists/list.html', {'lists':lists}) -@login_required @user_passes_test(lambda u: u.has_perm('todolists.add_todolist')) def add(request): if request.POST: -- cgit v1.2.3-54-g00ecf