summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-23 20:19:49 -0500
committerDan McGee <dan@archlinux.org>2011-06-23 20:19:49 -0500
commit55f6ad0c95323a5bfeca2c322918d21f413d1075 (patch)
tree559bc4e0aadbd2c92c8be1e6ff82df0e2dc1d3fc /packages
parentdcbb859a259082bf8d0587a63385ece44c697e45 (diff)
Set up queries for staging repos
This treats repo.staging special in much the way we already have to treat repo.testing as special. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/views.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/packages/views.py b/packages/views.py
index 02b9f93b..01d01e20 100644
--- a/packages/views.py
+++ b/packages/views.py
@@ -118,7 +118,8 @@ def details(request, name='', repo='', arch=''):
arches.extend(Arch.objects.filter(agnostic=True))
repo = get_object_or_404(Repo, name__iexact=repo)
pkgs = Package.objects.normal().filter(pkgbase=name,
- repo__testing=repo.testing, arch__in=arches).order_by('pkgname')
+ repo__testing=repo.testing, repo__staging=repo.staging,
+ arch__in=arches).order_by('pkgname')
if len(pkgs) == 0:
raise Http404
context = {
@@ -343,8 +344,8 @@ def unflag_all(request, name, repo, arch):
pkg = get_object_or_404(Package,
pkgname=name, repo__name__iexact=repo, arch__name=arch)
# find all packages from (hopefully) the same PKGBUILD
- pkgs = Package.objects.filter(
- pkgbase=pkg.pkgbase, repo__testing=pkg.repo.testing)
+ pkgs = Package.objects.filter(pkgbase=pkg.pkgbase,
+ repo__testing=pkg.repo.testing, repo__staging=pkg.repo.staging)
pkgs.update(flag_date=None)
return redirect(pkg)
@@ -416,7 +417,8 @@ def flag(request, name, repo, arch):
# find all packages from (hopefully) the same PKGBUILD
pkgs = Package.objects.normal().filter(
pkgbase=pkg.pkgbase, flag_date__isnull=True,
- repo__testing=pkg.repo.testing).order_by(
+ repo__testing=pkg.repo.testing,
+ repo__staging=pkg.repo.staging).order_by(
'pkgname', 'repo__name', 'arch__name')
if request.POST:
@@ -471,7 +473,8 @@ def flag_confirmed(request, name, repo, arch):
pkgname=name, repo__name__iexact=repo, arch__name=arch)
pkgs = Package.objects.normal().filter(
pkgbase=pkg.pkgbase, flag_date=pkg.flag_date,
- repo__testing=pkg.repo.testing).order_by(
+ repo__testing=pkg.repo.testing,
+ repo__staging=pkg.repo.staging).order_by(
'pkgname', 'repo__name', 'arch__name')
context = {'package': pkg, 'packages': pkgs}