Commit f19bb84c authored by David Haynes's avatar David Haynes 🙆
Browse files

Merge branch '62-friendly-names' into '2.1-dev'

Add friendly building names attribute

See merge request srct/whats-open!30
parents 0e3bb640 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,
......
......@@ -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',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment