59 lines
1.2 KiB
Python
59 lines
1.2 KiB
Python
from rest_framework import serializers
|
|
|
|
from sncfgtfs.models import Agency, Stop, Route, Trip, StopTime, Calendar, CalendarDate, \
|
|
Transfer, FeedInfo
|
|
|
|
|
|
class AgencySerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = Agency
|
|
fields = '__all__'
|
|
|
|
|
|
class StopSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = Stop
|
|
fields = '__all__'
|
|
|
|
|
|
class RouteSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = Route
|
|
fields = '__all__'
|
|
|
|
|
|
class TripSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = Trip
|
|
fields = '__all__'
|
|
|
|
|
|
class StopTimeSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = StopTime
|
|
fields = '__all__'
|
|
|
|
|
|
class CalendarSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = Calendar
|
|
fields = '__all__'
|
|
|
|
|
|
class CalendarDateSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = CalendarDate
|
|
fields = '__all__'
|
|
|
|
|
|
class TransferSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = Transfer
|
|
fields = '__all__'
|
|
|
|
|
|
class FeedInfoSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = FeedInfo
|
|
fields = '__all__'
|