On 17/11/16 12:47, Stephen Finucane wrote:
This mostly works out of the box, thanks to Django REST Framework.
Mostly unique fields, like name or email, are excluded as these will be
handled separately.
Signed-off-by: Stephen Finucane <step...@that.guru>
---
I need to disable django-filter support when it's not available.
However, its use would allow us to get rid of most of 'filters.py'.
Is this worth introducing a compulsory dependency for?
Hmm...
+class SeriesFilter(TimestampMixin, FilterSet):
+
+ class Meta:
+ model = Series
+ fields = ['submitter']
+
+
+class CoverLetterFilter(TimestampMixin, FilterSet):
+
+ class Meta:
+ model = CoverLetter
+ fields = ['series', 'submitter']
+
+
+class PatchFilter(FilterSet):
+
+ class Meta:
+ model = Patch
+ fields = ['series', 'submitter', 'delegate', 'state', 'archived']
'project' would be useful for all of these as well, I think.
diff --git a/requirements-test.txt b/requirements-test.txt
index 7cb5ae9..c664976 100644
--- a/requirements-test.txt
+++ b/requirements-test.txt
@@ -3,4 +3,4 @@ django-debug-toolbar==1.5
python-dateutil>2.0,<3.0
selenium>2.0,<3.0
djangorestframework>=3.4,<3.5
-drf-nested-routers>=0.11.1,<0.12
Why are we removing this here?
+django-filter>=0.15,<0.16
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnel...@au1.ibm.com IBM Australia Limited
_______________________________________________
Patchwork mailing list
Patchwork@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/patchwork