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
e9b0b328
Verified
Commit
e9b0b328
authored
Dec 29, 2017
by
David Haynes
🙆
Browse files
Comments, proper utf-8 encoding and pep8 clean
- just some simple fixings to make py2 compat work
parent
e4412c5e
Pipeline
#1899
passed with stage
in 1 minute and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
whats-open/api/models.py
View file @
e9b0b328
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
api/models.py
...
...
@@ -134,10 +136,12 @@ class Facility(TimeStampedModel):
message
=
'The link is not a valid tapingo link. Example: https://www.tapingo.com/order/restaurant/starbucks-gmu-johnson/'
,
code
=
'invalid_tapingo_url'
)])
phone_number
=
models
.
CharField
(
blank
=
True
,
max_length
=
18
,
validators
=
[
RegexValidator
(
regex
=
'^\(?([0-9]{3})\)?[-.●]?([0-9]{3})[-.●]?([0-9]{4})$'
,
message
=
'Invalid phone number'
,
code
=
'invalid_phone_number'
)])
# Phone number for a location if provided. Accept both ###-###-#### or
# without dashes
phone_number
=
models
.
CharField
(
blank
=
True
,
max_length
=
18
,
validators
=
[
RegexValidator
(
regex
=
'^\(?([0-9]{3})\)?[-.●]?([0-9]{3})[-.●]?([0-9]{4})$'
,
message
=
'Invalid phone number'
,
code
=
'invalid_phone_number'
)])
# A comma seperate list of words that neatly an aptly describe the product
# that this facility produces. (ex. for Taco Bell: mexican, taco, cheap)
facility_product_tags
=
TaggableManager
()
...
...
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