Extend LD Model
This commit is contained in:
parent
5c21ec8699
commit
6610c3b48e
25
billard/migrations/0003_auto_20170109_1509.py
Normal file
25
billard/migrations/0003_auto_20170109_1509.py
Normal 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),
|
||||
),
|
||||
]
|
@ -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)
|
||||
|
@ -12,6 +12,8 @@
|
||||
<th>Table</th>
|
||||
<th>Timestamp</th>
|
||||
<th>On_Off</th>
|
||||
<th>Proc</th>
|
||||
<th>Error</th>
|
||||
</tr>
|
||||
{% for location_data in object_list %}
|
||||
<tr>
|
||||
@ -20,6 +22,8 @@
|
||||
<td>{{ location_data.table_no }}</td>
|
||||
<td>{{ location_data.tst }}</td>
|
||||
<td>{{ location_data.on_off }}</td>
|
||||
<td>{{ location_data.processed }}</td>
|
||||
<td>{{ location_data.error_msg }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user