Verified Commit 4836ea4c authored by David Haynes's avatar David Haynes 🙆

Integrate @dbond commits from 7-locations

- serializer work plus adoption of slug for Facility
parent be0b6f97
Pipeline #1449 passed with stage
in 1 minute and 32 seconds
......@@ -51,7 +51,8 @@ class OpenTimeSerializer(serializers.ModelSerializer):
# Choose the model to be serialized
model = OpenTime
# Serialize all of the fields
fields = '__all__'
fields = ('schedule', 'modified',
'start_day', 'end_day', 'start_time', 'end_time')
class ScheduleSerializer(serializers.ModelSerializer):
"""
......@@ -93,6 +94,7 @@ class FacilitySerializer(serializers.HyperlinkedModelSerializer):
# Choose the model to be serialized
model = Facility
# List the fields that we are serializing
fields = ('id', 'facility_category', 'facility_location',
'facility_product_tags', 'tapingo_url', 'main_schedule',
'special_schedules', 'modified', 'facility_name')
fields = ('slug', 'facility_name', 'facility_location', 'facility_category',
'facility_product_tags', 'tapingo_url',
'main_schedule', 'special_schedules',
'modified', )
......@@ -390,6 +390,7 @@ class FacilityViewSet(viewsets.ReadOnlyModelViewSet):
search_fields = FILTER_FIELDS
ordering_fields = FILTER_FIELDS
filter_fields = FILTER_FIELDS
lookup_field = 'slug'
def get_queryset(self):
"""
......
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