From 4184dae7c46a95ede489f7b20b5befc69b3a20ba Mon Sep 17 00:00:00 2001 From: eliott Date: Sat, 5 Apr 2008 13:42:01 -0700 Subject: small fix to todolists --- templates/todolists/view.html | 10 +++++----- todolists/views.py | 13 ++++++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/templates/todolists/view.html b/templates/todolists/view.html index 8fe6014..c8a3e9b 100644 --- a/templates/todolists/view.html +++ b/templates/todolists/view.html @@ -32,7 +32,7 @@ {% endblock %} {% block content %}
-

ToDo List: {{ list.name }}

+

ToDo List: {{ list.name }}

@@ -48,10 +48,10 @@ {% for pkg in pkgs %} - - - - + + + +
{{ pkg.pkg.id }}{{ pkg.pkg.arch.name }}{{ pkg.pkg.repo.name }}{{ pkg.pkg.pkgname }}{{ pkg.pkg.maintainer.get_full_name }}{{ pkg.pkg.get_arch_display }}{{ pkg.pkg.get_repo_display }}{{ pkg.pkg.pkgname }}{{ pkg.pkg.maintainer.get_full_name|default:"Orphan" }} {% if pkg.complete %} Complete diff --git a/todolists/views.py b/todolists/views.py index dbfd440..9a4fdb9 100644 --- a/todolists/views.py +++ b/todolists/views.py @@ -10,7 +10,6 @@ import django.db IntegrityError = django.db.backend.Database.IntegrityError @login_required -#@is_maintainer def flag(request, listid, pkgid): list = get_object_or_404(Todolist, id=listid) pkg = get_object_or_404(TodolistPkg, id=pkgid) @@ -22,17 +21,20 @@ def flag(request, listid, pkgid): def view(request, listid): list = get_object_or_404(Todolist, id=listid) pkgs = TodolistPkg.objects.filter(list=list.id).order_by('pkg') - return render_response(request, 'todolists/view.html', {'list':list,'pkgs':pkgs}) + return render_response( + request, + 'todolists/view.html', + {'list':list,'pkgs':pkgs}) @login_required def list(request): lists = Todolist.objects.order_by('-date_added') for l in lists: - l.complete = TodolistPkg.objects.filter(list=l.id,complete=False).count() == 0 + l.complete = TodolistPkg.objects.filter( + list=l.id,complete=False).count() == 0 return render_response(request, 'todolists/list.html', {'lists':lists}) @login_required -#@is_maintainer @user_passes_test(lambda u: u.has_perm('todolists.add_todolist')) def add(request): if request.POST: @@ -49,7 +51,8 @@ def add(request): todo.save() # now link in packages for p in request.POST.get('packages').split("\n"): - for pkg in Package.objects.filter(pkgname=p.strip()).order_by('arch'): + for pkg in Package.objects.filter( + pkgname=p.strip()).order_by('arch'): todopkg = TodolistPkg( list = todo, pkg = pkg) -- cgit v1.2.3-24-g4f1b