summaryrefslogtreecommitdiff
path: root/packages/views/search.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-02-08 21:09:47 -0600
committerDan McGee <dan@archlinux.org>2013-02-08 21:09:47 -0600
commite65c7805547484cad1be55dfa20355ef18b857be (patch)
tree6945e7e76e061ecb426f320ed176186d0bc3df1b /packages/views/search.py
parent8d79a1ea84756b016fb76d940e95a8885d014dae (diff)
Remove package seach by 'Last Updated After'
It is a lot easier to just sort the list rather than mess with this particular field, which didn't even allow you to specify a range or direction to search in. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/views/search.py')
-rw-r--r--packages/views/search.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/packages/views/search.py b/packages/views/search.py
index 0f313ccb..9cb5f38d 100644
--- a/packages/views/search.py
+++ b/packages/views/search.py
@@ -3,7 +3,6 @@ import json
from pytz import utc
from django import forms
-from django.contrib.admin.widgets import AdminDateWidget
from django.contrib.auth.models import User
from django.db.models import Q
from django.http import HttpResponse
@@ -44,8 +43,6 @@ class PackageSearchForm(forms.Form):
sort = forms.CharField(required=False, widget=forms.HiddenInput())
maintainer = forms.ChoiceField(required=False)
packager = forms.ChoiceField(required=False)
- last_update = forms.DateField(required=False, widget=AdminDateWidget(),
- label='Last Updated After')
flagged = forms.ChoiceField(
choices=[('', 'All')] + make_choice(['Flagged', 'Not Flagged']),
required=False)
@@ -104,12 +101,6 @@ def parse_form(form, packages):
elif form.cleaned_data['flagged'] == 'Not Flagged':
packages = packages.filter(flag_date__isnull=True)
- if form.cleaned_data['last_update']:
- lu = form.cleaned_data['last_update']
- cutoff = datetime(lu.year, lu.month, lu.day, 0, 0)
- cutoff = cutoff.replace(tzinfo=utc)
- packages = packages.filter(last_update__gte=cutoff)
-
if form.cleaned_data['name']:
name = form.cleaned_data['name']
packages = packages.filter(pkgname=name)