Add a bus
This commit is contained in:
parent
6242e316ae
commit
822853be66
12 changed files with 218 additions and 29 deletions
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
from rest_framework import serializers
|
||||
|
||||
from ..models import WEIClub
|
||||
from ..models import WEIClub, Bus, BusTeam
|
||||
|
||||
|
||||
class WEIClubSerializer(serializers.ModelSerializer):
|
||||
|
|
@ -15,3 +15,25 @@ class WEIClubSerializer(serializers.ModelSerializer):
|
|||
class Meta:
|
||||
model = WEIClub
|
||||
fields = '__all__'
|
||||
|
||||
|
||||
class BusSerializer(serializers.ModelSerializer):
|
||||
"""
|
||||
REST API Serializer for Bus.
|
||||
The djangorestframework plugin will analyse the model `Bus` and parse all fields in the API.
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
model = Bus
|
||||
fields = '__all__'
|
||||
|
||||
|
||||
class BusTeamSerializer(serializers.ModelSerializer):
|
||||
"""
|
||||
REST API Serializer for Bus teams.
|
||||
The djangorestframework plugin will analyse the model `BusTeam` and parse all fields in the API.
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
model = BusTeam
|
||||
fields = '__all__'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue