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
f19bb84c
Commit
f19bb84c
authored
Nov 03, 2017
by
David Haynes
🙆
Browse files
Merge branch '62-friendly-names' into '2.1-dev'
Add friendly building names attribute See merge request
!30
parents
0e3bb640
cb17fb36
Pipeline
#1726
passed with stage
in 1 minute and 36 seconds
Changes
2
Pipelines
3
Show whitespace changes
Inline
Side-by-side
whats-open/api/models.py
View file @
f19bb84c
...
...
@@ -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 @
f19bb84c
...
...
@@ -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