summaryrefslogtreecommitdiffstats
path: root/packages/views.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-02-07 12:48:12 -0600
committerDan McGee <dan@archlinux.org>2011-02-15 13:51:11 -0600
commit376ce4a69e016d13eff28589a5caa627bf7c451b (patch)
tree347ffffa3db13e4d8a4f3c49379e6e3c28139de1 /packages/views.py
parent8c5358e88898c4eb620a132133c57a26f191dee1 (diff)
downloadarchweb-376ce4a69e016d13eff28589a5caa627bf7c451b.tar.gz
archweb-376ce4a69e016d13eff28589a5caa627bf7c451b.zip
Clean up Package related objects code
Main change is just to move groups from the default packagegroup_set location to a related_name of groups. Also refer to the Package class directly rather than by text string if we have it available. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/views.py')
-rw-r--r--packages/views.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/views.py b/packages/views.py
index 4f7c3b93..9c34db0c 100644
--- a/packages/views.py
+++ b/packages/views.py
@@ -104,8 +104,7 @@ def group_details(request, arch, name):
arch = get_object_or_404(Arch, name=arch)
arches = [ arch ]
arches.extend(Arch.objects.filter(agnostic=True))
- pkgs = Package.objects.filter(packagegroup__name=name,
- arch__in=arches)
+ pkgs = Package.objects.filter(groups__name=name, arch__in=arches)
pkgs = pkgs.order_by('pkgname')
if len(pkgs) == 0:
raise Http404