mirror of https://github.com/snachodog/mybuddy.git
Add id to filter fields for children (#625)
This commit is contained in:
parent
77d4ba1920
commit
5b0763161b
|
@ -33,7 +33,7 @@ class ChildViewSet(viewsets.ModelViewSet):
|
||||||
queryset = models.Child.objects.all()
|
queryset = models.Child.objects.all()
|
||||||
serializer_class = serializers.ChildSerializer
|
serializer_class = serializers.ChildSerializer
|
||||||
lookup_field = "slug"
|
lookup_field = "slug"
|
||||||
filterset_fields = ("first_name", "last_name", "slug", "birth_date")
|
filterset_fields = ("id", "first_name", "last_name", "slug", "birth_date")
|
||||||
ordering_fields = ("birth_date", "first_name", "last_name", "slug")
|
ordering_fields = ("birth_date", "first_name", "last_name", "slug")
|
||||||
ordering = "-birth_date"
|
ordering = "-birth_date"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue