summaryrefslogtreecommitdiff
path: root/packages/views.py
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2011-01-26 17:40:15 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2011-01-26 17:40:15 -0300
commiteb213526f53de045defa262c541e24a7e6fd14e6 (patch)
treed8e15932a4f1a0d79ce347d44fa6585bf9946248 /packages/views.py
parenta223ec4b71fd7505b206f6b3531cd25a6469ea9f (diff)
parent7d043be0b3d090d2f675af5b86856693aa73e787 (diff)
Merge branch 'master' of git://projects.archlinux.org/archweb
Diffstat (limited to 'packages/views.py')
-rw-r--r--packages/views.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/packages/views.py b/packages/views.py
index e00e6f94..4f7c3b93 100644
--- a/packages/views.py
+++ b/packages/views.py
@@ -232,7 +232,7 @@ def search(request, page=None):
extra_context=page_dict)
@vary_on_headers('X-Requested-With')
-def files(request, name='', repo='', arch=''):
+def files(request, name, repo, arch):
pkg = get_object_or_404(Package,
pkgname=name, repo__name__iexact=repo, arch__name=arch)
fileslist = PackageFile.objects.filter(pkg=pkg).order_by('path')
@@ -243,7 +243,7 @@ def files(request, name='', repo='', arch=''):
{'pkg':pkg, 'files':fileslist})
@permission_required('main.change_package')
-def unflag(request, name='', repo='', arch=''):
+def unflag(request, name, repo, arch):
pkg = get_object_or_404(Package,
pkgname=name, repo__name__iexact=repo, arch__name=arch)
pkg.flag_date = None
@@ -251,6 +251,16 @@ def unflag(request, name='', repo='', arch=''):
return redirect(pkg)
@permission_required('main.change_package')
+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.update(flag_date=None)
+ return redirect(pkg)
+
+@permission_required('main.change_package')
@never_cache
def signoffs(request):
packages = Package.objects.select_related('arch', 'repo', 'signoffs').filter(repo__testing=True).order_by("pkgname")
@@ -309,7 +319,7 @@ class FlagForm(forms.Form):
required=False)
@never_cache
-def flag(request, name='', repo='', arch=''):
+def flag(request, name, repo, arch):
pkg = get_object_or_404(Package,
pkgname=name, repo__name__iexact=repo, arch__name=arch)
context = {'pkg': pkg}
@@ -361,7 +371,7 @@ def flag(request, name='', repo='', arch=''):
return direct_to_template(request, 'packages/flag.html', context)
-def download(request, name='', repo='', arch=''):
+def download(request, name, repo, arch):
pkg = get_object_or_404(Package,
pkgname=name, repo__name__iexact=repo, arch__name=arch)
mirrorurl = MirrorUrl.objects.filter(mirror__country='Any',