Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
whats-open
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
whats-open
Commits
e9b0b328
Verified
Commit
e9b0b328
authored
Dec 29, 2017
by
David Haynes
🙆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
whats-open/api/models.py
whats-open/api/models.py
+8
-4
No files found.
whats-open/api/models.py
View file @
e9b0b328
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
api/models.py
...
...
@@ -134,7 +136,9 @@ 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})$'
,
# 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'
)])
...
...
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