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

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):
"facility_location",
"main_schedule",
"special_schedules",
("facility_product_tags", "facility_labels", "facility_classifier"),
("facility_product_tags", "facility_classifier"),
"tapingo_url",
"phone_number",
"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):
)
# The physical address of the facility.
address = models.CharField(max_length=100)
campus_region = models.CharField(
choices=CAMPUS_LOCATIONS, max_length=100, default="fairfax"
)
campus_region = models.CharField(choices=CAMPUS_LOCATIONS, max_length=100)
# 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
......@@ -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.",
)
# 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.
FACILITY_CLASSES = (
("shopmason", "shopMason Facility"),
("sodoxo", "Sodoxo Facility"),
)
FACILITY_CLASSES = (("shopmason", "shopMason Facility"),)
facility_classifier = models.CharField(
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,
blank=True,
)
......
......@@ -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
"""
# App Imports
from .models import Category, Facility, Schedule, OpenTime, Location, Alert
# Other Imports
from rest_framework import serializers
from taggit_serializer.serializers import TagListSerializerField
# App Imports
from .models import Category, Facility, Schedule, OpenTime, Location, Alert
class AlertSerializer(serializers.ModelSerializer):
"""
......@@ -109,7 +109,6 @@ class FacilitySerializer(serializers.HyperlinkedModelSerializer):
main_schedule = ScheduleSerializer(many=False, read_only=True)
special_schedules = ScheduleSerializer(many=True, read_only=True)
facility_product_tags = TagListSerializerField()
facility_labels = TagListSerializerField()
facility_classifier = TagListSerializerField()
class Meta:
......@@ -124,7 +123,6 @@ class FacilitySerializer(serializers.HyperlinkedModelSerializer):
"facility_category",
"phone_number",
"facility_product_tags",
"facility_labels",
"facility_classifier",
"tapingo_url",
"note",
......
......@@ -384,7 +384,6 @@ class FacilityViewSet(viewsets.ReadOnlyModelViewSet):
"tapingo_url",
"note",
"facility_product_tags__name",
"facility_labels__name",
# Category fields
"facility_category__name",
# 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