Commit bf440a26 authored by Aymeric Barantal's avatar Aymeric Barantal

add route for an argument detail in a given language

parent 1fbbd7f4
......@@ -38,3 +38,8 @@ class ArgumentaryViewSet(viewsets.ReadOnlyModelViewSet):
argumentaries = self.queryset.filter(campaign=campaign_pk)
serializer = self.serializer_class(argumentaries.all(), many=True)
return Response(serializer.data)
def retrieve(self, request, pk=None, campaign_pk=None):
argument = self.queryset.get(lang=pk, campaign=campaign_pk)
serializer = self.serializer_class(argument)
return Response(serializer.data)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment