serializers.py 493 Bytes
Newer Older
1
from rest_framework import serializers
2
from website.models import Category, Facility, Schedule, OpenTime
3

Ben Waters's avatar
Ben Waters committed
4
5
6
class CategorySerializer(serializers.ModelSerializer):
    class Meta:
        model = Category
Ben Waters's avatar
Ben Waters committed
7

Ben Waters's avatar
Ben Waters committed
8
9
10
class FacilitySerializer(serializers.ModelSerializer):
    class Meta:
        model = Facility
Ben Waters's avatar
Ben Waters committed
11

Ben Waters's avatar
Ben Waters committed
12
13
14
class ScheduleSerializer(serializers.ModelSerializer):
    class Meta:
        model = Schedule
Ben Waters's avatar
Ben Waters committed
15

Ben Waters's avatar
Ben Waters committed
16
17
18
class OpenTimeSerializer(serializers.ModelSerializer):
    class Meta:
        model = OpenTime