Commit 6a048bb9 authored by David Haynes's avatar David Haynes
Browse files

Serialize tapingo_url

Closes #36
parent 3178dd30
...@@ -107,7 +107,7 @@ class Facility(TimeStampedModel): ...@@ -107,7 +107,7 @@ class Facility(TimeStampedModel):
# URL, if it exists, to the Tapingo page that is associated with this # URL, if it exists, to the Tapingo page that is associated with this
# facility # facility
tapingo_url = models.URLField(blank=True, validators=[RegexValidator(regex='^https:\/\/www.tapingo.com\/', tapingo_url = models.URLField(blank=True, validators=[RegexValidator(regex='^https:\/\/www.tapingo.com\/',
message='The link is not a valid tapingo link Example: https://www.tapingo.com/order/restaurant/starbucks-gmu-johnson/', message='The link is not a valid tapingo link. Example: https://www.tapingo.com/order/restaurant/starbucks-gmu-johnson/',
code='invalid_tapingo_url')]) code='invalid_tapingo_url')])
def is_open(self): def is_open(self):
......
...@@ -89,5 +89,5 @@ class FacilitySerializer(serializers.HyperlinkedModelSerializer): ...@@ -89,5 +89,5 @@ class FacilitySerializer(serializers.HyperlinkedModelSerializer):
# Choose the model to be serialized # Choose the model to be serialized
model = Facility model = Facility
# List the fields that we are serializing # List the fields that we are serializing
fields = ('id', 'facility_category', 'facility_location', fields = ('id', 'facility_category', 'facility_location', 'tapingo_url',
'main_schedule', 'special_schedules', 'modified', 'name') 'main_schedule', 'special_schedules', 'modified', 'name')
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