summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/views.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/views.py b/packages/views.py
index 79793355..61e4d290 100644
--- a/packages/views.py
+++ b/packages/views.py
@@ -199,6 +199,9 @@ class PackageSearchForm(forms.Form):
flagged = forms.ChoiceField(
choices=[('', 'All')] + make_choice(['Flagged', 'Not Flagged']),
required=False)
+ signed = forms.ChoiceField(
+ choices=[('', 'All')] + make_choice(['Signed', 'Unsigned']),
+ required=False)
limit = LimitTypedChoiceField(
choices=make_choice([50, 100, 250]) + [('all', 'All')],
coerce=coerce_limit_value,
@@ -254,6 +257,11 @@ def search(request, page=None):
elif form.cleaned_data['flagged'] == 'Not Flagged':
packages = packages.filter(flag_date__isnull=True)
+ if form.cleaned_data['signed'] == 'Signed':
+ packages = packages.filter(pgp_signature__isnull=False)
+ elif form.cleaned_data['signed'] == 'Unsigned':
+ packages = packages.filter(pgp_signature__isnull=True)
+
if form.cleaned_data['q']:
query = form.cleaned_data['q']
q = Q(pkgname__icontains=query) | Q(pkgdesc__icontains=query)