@@ -22,6 +22,7 @@ from django.core.exceptions import ValidationError
from django_filters import FilterSet
from django_filters import IsoDateTimeFilter
from django_filters import ModelChoiceFilter
+from django_filters import NumberFilter
from django.forms import ModelChoiceField
from patchwork.models import Bundle
@@ -178,6 +179,10 @@ class CheckFilter(TimestampMixin, FilterSet):
class EventFilter(ProjectMixin, TimestampMixin, FilterSet):
+ patch = NumberFilter()
+ series = NumberFilter()
+ cover = NumberFilter()
+
class Meta:
model = Event
fields = ('project', 'category', 'series', 'patch', 'cover')
The filter widget is pretty dumb, containing a full list of every patch in the system. We will want to rework this in the future, but for now just stop generating a stupid big '<select>' and require people fill this in manually. Signed-off-by: Stephen Finucane <stephen@that.guru> --- patchwork/api/filters.py | 5 +++++ 1 file changed, 5 insertions(+)