From 6610c3b48ed6d9600ffcf6ed3cf8ed6f9b6228d6 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Mon, 9 Jan 2017 15:37:25 +0100 Subject: [PATCH] Extend LD Model --- billard/migrations/0003_auto_20170109_1509.py | 25 +++++++++++++++++++ billard/models.py | 2 ++ .../templates/billard/locationdata_list.html | 4 +++ 3 files changed, 31 insertions(+) create mode 100644 billard/migrations/0003_auto_20170109_1509.py diff --git a/billard/migrations/0003_auto_20170109_1509.py b/billard/migrations/0003_auto_20170109_1509.py new file mode 100644 index 0000000..5f003d4 --- /dev/null +++ b/billard/migrations/0003_auto_20170109_1509.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-01-09 14:09 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('billard', '0002_locationdata'), + ] + + operations = [ + migrations.AddField( + model_name='locationdata', + name='error_msg', + field=models.CharField(blank=True, max_length=16000, null=True), + ), + migrations.AddField( + model_name='locationdata', + name='processed', + field=models.BooleanField(default=False), + ), + ] diff --git a/billard/models.py b/billard/models.py index c27ef18..6df1b68 100644 --- a/billard/models.py +++ b/billard/models.py @@ -39,6 +39,8 @@ class LocationData(models.Model): 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(blank=False, null=False, default=False) + error_msg = models.CharField(max_length=16000, blank=True, null=True) def __str__(self): return str(self.location_id) diff --git a/billard/templates/billard/locationdata_list.html b/billard/templates/billard/locationdata_list.html index 1bfc956..46853a5 100644 --- a/billard/templates/billard/locationdata_list.html +++ b/billard/templates/billard/locationdata_list.html @@ -12,6 +12,8 @@ Table Timestamp On_Off + Proc + Error {% for location_data in object_list %} @@ -20,6 +22,8 @@ {{ location_data.table_no }} {{ location_data.tst }} {{ location_data.on_off }} + {{ location_data.processed }} + {{ location_data.error_msg }} {% endfor %}