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

Remove sodoxo classifier

Closes # 93
parent 9b1a2d9b
Pipeline #3726 passed with stage
in 1 minute and 4 seconds
...@@ -126,7 +126,7 @@ class FacilityAdmin(admin.ModelAdmin): ...@@ -126,7 +126,7 @@ class FacilityAdmin(admin.ModelAdmin):
"facility_location", "facility_location",
"main_schedule", "main_schedule",
"special_schedules", "special_schedules",
("facility_product_tags", "facility_labels", "facility_classifier"), ("facility_product_tags", "facility_classifier"),
"tapingo_url", "tapingo_url",
"phone_number", "phone_number",
"note", "note",
......
# Generated by Django 2.0.10 on 2019-01-26 18:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0002_auto_20190126_1306'),
]
operations = [
migrations.AlterField(
model_name='facility',
name='facility_classifier',
field=models.CharField(blank=True, choices=[('shopmason', 'shopMason Facility')], help_text="Tag this facility to be shown on the ShopMason What's Open sites.", max_length=100),
),
migrations.AlterField(
model_name='location',
name='campus_region',
field=models.CharField(choices=[('front royal', 'Front Royal'), ('prince william', 'Prince William County Science and Technology'), ('fairfax', 'Fairfax'), ('arlington', 'Arlington')], max_length=100),
),
]
...@@ -73,9 +73,7 @@ class Location(TimeStampedModel): ...@@ -73,9 +73,7 @@ class Location(TimeStampedModel):
) )
# The physical address of the facility. # The physical address of the facility.
address = models.CharField(max_length=100) address = models.CharField(max_length=100)
campus_region = models.CharField( campus_region = models.CharField(choices=CAMPUS_LOCATIONS, max_length=100)
choices=CAMPUS_LOCATIONS, max_length=100, default="fairfax"
)
# Boolean for whether or not the location is "on campus" or not. # Boolean for whether or not the location is "on campus" or not.
on_campus = models.BooleanField(default=True) on_campus = models.BooleanField(default=True)
# A GeoJson coordinate pair that represents the physical location # A GeoJson coordinate pair that represents the physical location
...@@ -183,15 +181,12 @@ class Facility(TimeStampedModel): ...@@ -183,15 +181,12 @@ class Facility(TimeStampedModel):
help_text="A comma seperate list of words that neatly and aptly describe the product that this facility produces. These words are not shown to the use but are rather used in search.", help_text="A comma seperate list of words that neatly and aptly describe the product that this facility produces. These words are not shown to the use but are rather used in search.",
) )
# Tag a Facility to be shown on the ShopMason or Sodoxo (or both) # Tag a Facility to be shown on the ShopMason
# What's Open sites. # What's Open sites.
FACILITY_CLASSES = ( FACILITY_CLASSES = (("shopmason", "shopMason Facility"),)
("shopmason", "shopMason Facility"),
("sodoxo", "Sodoxo Facility"),
)
facility_classifier = models.CharField( facility_classifier = models.CharField(
choices=FACILITY_CLASSES, choices=FACILITY_CLASSES,
help_text="Tag this facility to be shown on the ShopMason or Sodoxo What's Open sites.", help_text="Tag this facility to be shown on the ShopMason What's Open sites.",
max_length=100, max_length=100,
blank=True, blank=True,
) )
......
...@@ -8,13 +8,13 @@ can then be easily rendered into JSON, XML or other content types. ...@@ -8,13 +8,13 @@ can then be easily rendered into JSON, XML or other content types.
http://www.django-rest-framework.org/api-guide/serializers http://www.django-rest-framework.org/api-guide/serializers
""" """
# App Imports
from .models import Category, Facility, Schedule, OpenTime, Location, Alert
# Other Imports # Other Imports
from rest_framework import serializers from rest_framework import serializers
from taggit_serializer.serializers import TagListSerializerField from taggit_serializer.serializers import TagListSerializerField
# App Imports
from .models import Category, Facility, Schedule, OpenTime, Location, Alert
class AlertSerializer(serializers.ModelSerializer): class AlertSerializer(serializers.ModelSerializer):
""" """
...@@ -109,7 +109,6 @@ class FacilitySerializer(serializers.HyperlinkedModelSerializer): ...@@ -109,7 +109,6 @@ class FacilitySerializer(serializers.HyperlinkedModelSerializer):
main_schedule = ScheduleSerializer(many=False, read_only=True) main_schedule = ScheduleSerializer(many=False, read_only=True)
special_schedules = ScheduleSerializer(many=True, read_only=True) special_schedules = ScheduleSerializer(many=True, read_only=True)
facility_product_tags = TagListSerializerField() facility_product_tags = TagListSerializerField()
facility_labels = TagListSerializerField()
facility_classifier = TagListSerializerField() facility_classifier = TagListSerializerField()
class Meta: class Meta:
...@@ -124,7 +123,6 @@ class FacilitySerializer(serializers.HyperlinkedModelSerializer): ...@@ -124,7 +123,6 @@ class FacilitySerializer(serializers.HyperlinkedModelSerializer):
"facility_category", "facility_category",
"phone_number", "phone_number",
"facility_product_tags", "facility_product_tags",
"facility_labels",
"facility_classifier", "facility_classifier",
"tapingo_url", "tapingo_url",
"note", "note",
......
...@@ -384,7 +384,6 @@ class FacilityViewSet(viewsets.ReadOnlyModelViewSet): ...@@ -384,7 +384,6 @@ class FacilityViewSet(viewsets.ReadOnlyModelViewSet):
"tapingo_url", "tapingo_url",
"note", "note",
"facility_product_tags__name", "facility_product_tags__name",
"facility_labels__name",
# Category fields # Category fields
"facility_category__name", "facility_category__name",
# Location fields # Location 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