[arch-general] Two tiny patches for archweb_dev's ToDo lists
I tested both patches locally and they appear to work. They are really tiny and straightforward so they should be safe to apply to the live dev site with little/no further testing. (I'm not sure who is maintaining the web interface nowadays, so I'm sending the patches to this ML.)
This should fix the issue with Community-Testing packages appearing in ToDo lists. After this change has been applied, simply edit and save a ToDo list to make its Community-Testing packages go away. --- todolists/views.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/todolists/views.py b/todolists/views.py index 3c03b30..72fed16 100644 --- a/todolists/views.py +++ b/todolists/views.py @@ -23,7 +23,8 @@ class TodoListForm(forms.Form): self.cleaned_data['packages'].split("\n")] package_names = set(package_names) packages = Package.objects.filter( - pkgname__in=package_names).exclude(repo__name="Testing").order_by('arch') + pkgname__in=package_names).exclude( + repo__name__endswith="Testing").order_by('arch') return packages -- 1.6.6.1
The list() view was incorrectly returning from the loop that marks ToDos as complete and thus allowing only the first ToDo to be processed. --- todolists/views.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/todolists/views.py b/todolists/views.py index 72fed16..fb03e0c 100644 --- a/todolists/views.py +++ b/todolists/views.py @@ -45,8 +45,8 @@ def list(request): for l in lists: l.complete = TodolistPkg.objects.filter( list=l.id,complete=False).count() == 0 - return render_to_response('todolists/list.html', - RequestContext(request, {'lists':lists})) + return render_to_response('todolists/list.html', + RequestContext(request, {'lists':lists})) @permission_required('main.add_todolist') def add(request): -- 1.6.6.1
On Sat, Jan 23, 2010 at 5:52 PM, Evangelos Foutras <foutrelis@gmail.com> wrote:
I tested both patches locally and they appear to work. They are really tiny and straightforward so they should be safe to apply to the live dev site with little/no further testing.
(I'm not sure who is maintaining the web interface nowadays, so I'm sending the patches to this ML.)
That's great. Someone will merge these patches, but I just wanted to say thanks. I love it when people scratch their own itches. You're my hero :)
participants (2)
-
Aaron Griffin
-
Evangelos Foutras