Extend LD Model

This commit is contained in:
Robert Einsle 2017-01-09 15:37:25 +01:00
parent 5c21ec8699
commit 6610c3b48e
3 changed files with 31 additions and 0 deletions

View File

@ -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),
),
]

View File

@ -39,6 +39,8 @@ class LocationData(models.Model):
table_no = models.IntegerField(blank=False, null=False) table_no = models.IntegerField(blank=False, null=False)
tst = models.DateTimeField(blank=False, null=False) tst = models.DateTimeField(blank=False, null=False)
on_off = models.BooleanField(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): def __str__(self):
return str(self.location_id) return str(self.location_id)

View File

@ -12,6 +12,8 @@
<th>Table</th> <th>Table</th>
<th>Timestamp</th> <th>Timestamp</th>
<th>On_Off</th> <th>On_Off</th>
<th>Proc</th>
<th>Error</th>
</tr> </tr>
{% for location_data in object_list %} {% for location_data in object_list %}
<tr> <tr>
@ -20,6 +22,8 @@
<td>{{ location_data.table_no }}</td> <td>{{ location_data.table_no }}</td>
<td>{{ location_data.tst }}</td> <td>{{ location_data.tst }}</td>
<td>{{ location_data.on_off }}</td> <td>{{ location_data.on_off }}</td>
<td>{{ location_data.processed }}</td>
<td>{{ location_data.error_msg }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>