Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open
Commits
6a048bb9
Commit
6a048bb9
authored
Jun 23, 2017
by
David Haynes
Browse files
Serialize tapingo_url
Closes
#36
parent
3178dd30
Pipeline
#1406
passed with stage
in 1 minute and 20 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
whats-open/api/models.py
View file @
6a048bb9
...
...
@@ -107,7 +107,7 @@ class Facility(TimeStampedModel):
# URL, if it exists, to the Tapingo page that is associated with this
# facility
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'
)])
def
is_open
(
self
):
...
...
whats-open/api/serializers.py
View file @
6a048bb9
...
...
@@ -89,5 +89,5 @@ 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'
,
fields
=
(
'id'
,
'facility_category'
,
'facility_location'
,
'tapingo_url'
,
'main_schedule'
,
'special_schedules'
,
'modified'
,
'name'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment