Commit 4a4a8ae7 authored by David Haynes's avatar David Haynes
Browse files

Merge branch 'upgrade-django' into 15-README-redo

parents 0675ce93 c92d6c27
......@@ -4,18 +4,18 @@ from website.models import Category, Facility, Schedule, OpenTime
class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = Category
#fields = '__all__'
fields = '__all__'
class OpenTimeSerializer(serializers.ModelSerializer):
class Meta:
model = OpenTime
#fields = '__all__'
fields = '__all__'
class ScheduleSerializer(serializers.ModelSerializer):
open_times = OpenTimeSerializer(many=True, read_only=True)
class Meta:
model = Schedule
#fields = ( 'id', 'open_times', 'last_modified', 'name', 'valid_start', 'valid_end' )
fields = ( 'id', 'open_times', 'modified', 'name', 'valid_start', 'valid_end' )
class FacilitySerializer(serializers.HyperlinkedModelSerializer):
category = CategorySerializer(many=False, read_only=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment