Commit bf440a26 authored by Aymeric Barantal's avatar Aymeric Barantal
Browse files

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(
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(
Supports Markdown
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