Verified Commit e8df9e08 authored by David Haynes's avatar David Haynes 🙆
Browse files

Add support for multiple campuses

- each Location must lie within a campus_region, or, an area that is within
the nearest vicinity to a GMU campus

Closes #55
parent d8371cc6
Pipeline #1440 failed with stage
in 1 minute and 56 seconds
......@@ -53,10 +53,19 @@ class Location(TimeStampedModel):
Represents a specific location that a Facility can be found.
# (set in model, human readable version)
("prince william", "Prince William County Science and Technology"),
("korea", "Mason Korea"),
("fairfax", "Fairfax"),
("arlington", "Arlington")
# The building that the facility is located in (on campus).
building = models.CharField(max_length=100)
# The physical address of the facility.
address = models.CharField(max_length=100)
campus_region = models.CharField(choices=CAMPUS_LOCATIONS,
max_length=100, default="fairfax")
# Boolean for whether or not the location is "on campus" or not.
on_campus = models.BooleanField(default=True)
# A GeoJson coordinate pair that represents the physical location
......@@ -248,7 +248,8 @@ class LocationViewSet(viewsets.ReadOnlyModelViewSet):
# Location fields
# Associate a serializer with the ViewSet
......@@ -346,6 +347,7 @@ class FacilityViewSet(viewsets.ReadOnlyModelViewSet):
# Schedule fields
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