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
cb17fb36
Verified
Commit
cb17fb36
authored
Nov 03, 2017
by
David Haynes
🙆
Browse files
Add friendly building names attribute
- specify as abbreviation Closes #62
parent
0e3bb640
Pipeline
#1721
passed with stage
in 1 minute and 37 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
whats-open/api/models.py
View file @
cb17fb36
...
...
@@ -63,6 +63,10 @@ class Location(TimeStampedModel):
)
# The building that the facility is located in (on campus).
building
=
models
.
CharField
(
max_length
=
100
)
friendly_building
=
models
.
CharField
(
'Building Abbreviation'
,
help_text
=
"Example: Exploratory Hall becomes EXPL"
,
blank
=
True
,
max_length
=
10
)
# The physical address of the facility.
address
=
models
.
CharField
(
max_length
=
100
)
campus_region
=
models
.
CharField
(
choices
=
CAMPUS_LOCATIONS
,
...
...
whats-open/api/views.py
View file @
cb17fb36
...
...
@@ -270,6 +270,7 @@ class LocationViewSet(viewsets.ReadOnlyModelViewSet):
FILTER_FIELDS
=
(
# Location fields
'building'
,
'friendly_building'
,
'address'
,
'on_campus'
,
'campus_region'
...
...
@@ -368,6 +369,7 @@ class FacilityViewSet(viewsets.ReadOnlyModelViewSet):
'facility_category__name'
,
# Location fields
'facility_location__building'
,
'facility_location_friendly_building'
,
'facility_location__address'
,
'facility_location__on_campus'
,
'facility_location__campus_region'
,
...
...
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