Remove obsolete HSLDataModel

This commit is contained in:
Jan Tuomi
2017-10-31 16:57:56 +02:00
parent 96f630ed2f
commit 480e2c4296
5 changed files with 19 additions and 13 deletions
-6
View File
@@ -12,12 +12,6 @@ from django.utils.dateformat import format
from django.conf import settings from django.conf import settings
from infoscreen.models import HSLDataModel
last_fetched = timezone.now()
INTERVAL = 1 # minutes
# logging.info(
# "Set up scheduled HSL API fetch every {} minutes".format(INTERVAL))
with open(os.path.join(settings.BASE_DIR, 'infoscreen', 'hsl_stops.graphql')) as stops_file: with open(os.path.join(settings.BASE_DIR, 'infoscreen', 'hsl_stops.graphql')) as stops_file:
STOPS_QUERY = stops_file.read() STOPS_QUERY = stops_file.read()
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-10-31 14:56
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('infoscreen', '0005_auto_20170913_1841'),
]
operations = [
migrations.DeleteModel(
name='HSLDataModel',
),
]
-5
View File
@@ -407,8 +407,3 @@ class UploadFileForm(forms.Form):
name = forms.CharField() name = forms.CharField()
video = forms.FileField() video = forms.FileField()
class HSLDataModel(models.Model):
"""Model representing HSL data."""
data = models.TextField(default="", editable=False)
-1
View File
@@ -20,7 +20,6 @@ from infoscreen.models import (ABBInfoItem, ExternalImageInfoItem,
from infoscreen.models import EventInfoItem from infoscreen.models import EventInfoItem
from infoscreen.models import ExternalWebsiteInfoItem from infoscreen.models import ExternalWebsiteInfoItem
from infoscreen.models import ImageUploadForm from infoscreen.models import ImageUploadForm
from infoscreen.models import HSLDataModel
from infoscreen.models import ApyInfoItem from infoscreen.models import ApyInfoItem
from infoscreen.models import VideoInfoItem from infoscreen.models import VideoInfoItem
+1 -1
View File
@@ -3,7 +3,7 @@ from django.http import HttpResponse, JsonResponse, HttpResponseBadRequest
from django.views.decorators.http import require_http_methods from django.views.decorators.http import require_http_methods
from django.conf import settings from django.conf import settings
from infoscreen.models import Rotation, InfoItem, InfoInstance, HSLDataModel from infoscreen.models import Rotation, InfoItem, InfoInstance
from infoscreen.hsl_fetcher import fetch as hsl_fetch from infoscreen.hsl_fetcher import fetch as hsl_fetch
import json import json