add locationdata process logic

This commit is contained in:
2017-02-06 19:58:32 +01:00
parent 3a48ac9c6b
commit dae777892b
3 changed files with 48 additions and 10 deletions

View File

@@ -4,18 +4,17 @@ from django.contrib.auth.models import User
from datetime import datetime
from . import utils
from . import tasks
from caromserver import celery
from django.contrib.auth.models import User
from django.db.models.signals import post_save
class LocationData(models.Model):
location_id = models.CharField(max_length=32, blank=False, null=False, name="Standort-ID")
table_no = models.IntegerField(blank=False, null=False, name="Tischnummer")
tst = models.DateTimeField(blank=False, null=False, name="Zeitstempel")
on_off = models.BooleanField(blank=False, null=False, name="Ein/Ausgebucht")
processed = models.BooleanField(default=False, name="Verarbeitet")
error_msg = models.CharField(max_length=16000, blank=True, null=True, name="Fehlermeldung")
location_id = models.UUIDField(blank=False, null=False)
table_no = models.IntegerField(blank=False, null=False)
tst = models.DateTimeField(blank=False, null=False)
on_off = models.BooleanField(blank=False, null=False)
processed = models.BooleanField(default=False)
error_msg = models.CharField(max_length=16000, blank=True, null=True)
def __str__(self):
return str(self.location_id)