Commits

Fernando G N Rocha committed 5a19777

Docstrings

Comments (0)

Files changed (1)

 
 
 class SpeakerList(generics.ListCreateAPIView):
+    '''
+    Endpoint que representa a lista de palestrantes, e permite que novos
+    palestrantes sejam cadastrados.
+    '''
     model = Speaker
     serializer_class = serializers.SpeakerSerializer
 
 
 class SpeakerDetail(generics.RetrieveUpdateAPIView):
+    '''
+    Endpoint que representa uma instancia de palestrante, e permite que novos
+    palestrantes sejam atualizados.
+    '''
     model = Speaker
     serializer_class = serializers.SpeakerSerializer
 
 
 class TalkList(generics.ListCreateAPIView):
+    '''
+    Endpoint que representa a lista de palestras, e permite que novas
+    palestras sejam atualizados.
+
+    Ao passar o parametro `level` na url, sera aplicado o filtro pelo nivel,
+    que sao:
+
+    - beginner
+    - intermediate
+    - advanced
+    '''
     model = Talk
     serializer_class = serializers.TalkSerializer
     permission_classes = (AllowAny,)
 
 
 class TalkDetail(generics.RetrieveUpdateAPIView):
-    model = Speaker
+    '''
+    Endpoint que representa uma instancia de palestra, e permite que novas
+    palestras sejam atualizados.
+    '''
+    model = Talk
     serializer_class = serializers.TalkSerializer
     permission_classes = (AllowAny,)
 
 
 @api_view(['GET'])
 def api_root(request, format=None):
-    """
+    '''
     The entry endpoint of our API.
-    """
+    '''
     return Response({
         'speakers': reverse('speaker-list', request=request),
         'talks': reverse('talk-list', request=request),