Renommage et commentaires.
This commit is contained in:
parent
95b900c9c8
commit
ddde9df944
Binary file not shown.
Binary file not shown.
@ -9,5 +9,5 @@ urlpatterns = [
|
||||
path('rules/', ListRulesView.as_view()),
|
||||
path('teams/', ListTeamView.as_view()),
|
||||
path('teampilots/', ListTeamPilotView.as_view()),
|
||||
url('race/(?P<raceid>\d+)/team/(?P<teamid>\d+)/relays', ListRelaysByRaceView.as_view()),
|
||||
url('race/(?P<raceid>\d+)/team/(?P<teamid>\d+)/relays', ListRelaysByRaceAndTeamView.as_view()),
|
||||
]
|
@ -17,45 +17,31 @@ class ListDriverView(generics.ListAPIView):
|
||||
serializer_class = DriverSerializer
|
||||
|
||||
class ListRaceView(generics.ListAPIView):
|
||||
"""
|
||||
Provides a get method handler.
|
||||
"""
|
||||
queryset = Race.objects.all()
|
||||
serializer_class = RaceSerializer
|
||||
|
||||
class ListRelayView(generics.ListAPIView):
|
||||
"""
|
||||
Provides a get method handler.
|
||||
"""
|
||||
queryset = Relay.objects.all()
|
||||
serializer_class = RelaySerializer
|
||||
|
||||
class ListRulesView(generics.ListAPIView):
|
||||
"""
|
||||
Provides a get method handler.
|
||||
"""
|
||||
queryset = Rules.objects.all()
|
||||
serializer_class = RulesSerializer
|
||||
|
||||
class ListTeamView(generics.ListAPIView):
|
||||
"""
|
||||
Provides a get method handler.
|
||||
"""
|
||||
queryset = Team.objects.all()
|
||||
serializer_class = TeamSerializer
|
||||
|
||||
class ListTeamPilotView(generics.ListAPIView):
|
||||
"""
|
||||
Provides a get method handler.
|
||||
"""
|
||||
queryset = TeamPilot.objects.all()
|
||||
serializer_class = TeamPilotSerializer
|
||||
|
||||
class ListRelaysByRaceView(generics.ListAPIView):
|
||||
'''
|
||||
|
||||
class ListRelaysByRaceAndTeamView(generics.ListAPIView):
|
||||
"""
|
||||
Getting the params from the url with the "self.kwargs.get"
|
||||
and filter with thoses in the relays relation
|
||||
'''
|
||||
"""
|
||||
serializer_class = RelayPilotSerializer
|
||||
lookup_url_raceid = "raceid"
|
||||
lookup_url_teamid = "teamid"
|
||||
|
Loading…
x
Reference in New Issue
Block a user