diff options
-rw-r--r-- | packages/views/search.py | 9 | ||||
-rw-r--r-- | templates/packages/search.html | 14 |
2 files changed, 0 insertions, 23 deletions
diff --git a/packages/views/search.py b/packages/views/search.py index 0f313cc..9cb5f38 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) diff --git a/templates/packages/search.html b/templates/packages/search.html index ab9b6d3..a5d52d6 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -1,13 +1,11 @@ {% extends "base.html" %} {% load package_extras %} -{% load admin_static %} {% block title %}Arch Linux - Package Database{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block head %} {% if is_paginated and page_obj.number > 1 %}<meta name="robots" content="noindex, nofollow"/>{% endif %} -<link rel="stylesheet" type="text/css" href="{% static "admin/css/widgets.css" %}" /> <link rel="alternate" type="application/rss+xml" title="Arch Linux Package Updates" href="/feeds/packages/" /> {% endblock %} @@ -35,9 +33,6 @@ <div>{{ search_form.maintainer.errors }} <label for="id_maintainer" title="Limit results to a specific maintainer"> Maintainer</label>{{ search_form.maintainer}}</div> - <div>{{ search_form.last_update.errors }} - <label for="id_last_update" title="Limit results to a date after the date entered"> - Last Updated After</label>{{ search_form.last_update }}</div> <div>{{ search_form.flagged.errors }} <label for="id_flagged" title="Limit results based on out-of-date status"> Flagged</label>{{ search_form.flagged }}</div> @@ -126,13 +121,4 @@ For unsupported packages, browse the <a href="https://aur.archlinux.org/" title="AUR package database">Arch User Repository (AUR).</a></p> </div> - -{% load cdn %}{% jquery %} -<script type="text/javascript" src="/jsi18n/"></script> -<script type="text/javascript"> - window.__admin_media_prefix__ = "{% filter escapejs %}{% static "admin/" %}{% endfilter %}"; - var django = {"jQuery": jQuery}; -</script> -<script type="text/javascript" src="{% static "admin/js/core.js" %}"></script> -{{search_form.media}} {% endblock %} |