rename table_no to desk_no
This commit is contained in:
parent
55cdfc0509
commit
93028156b7
@ -16,8 +16,8 @@ class ClientAdmin(admin.ModelAdmin):
|
|||||||
|
|
||||||
@admin.register(LocationData)
|
@admin.register(LocationData)
|
||||||
class LocationDataAdmin(admin.ModelAdmin):
|
class LocationDataAdmin(admin.ModelAdmin):
|
||||||
list_display = ('location_id', 'table_no', 'tst', 'on_off', 'processed', 'error_msg')
|
list_display = ('location_id', 'desk_no', 'tst', 'on_off', 'processed', 'error_msg')
|
||||||
fields = ['location_id', 'table_no', 'tst', 'on_off', 'processed', 'error_msg']
|
fields = ['location_id', 'desk_no', 'tst', 'on_off', 'processed', 'error_msg']
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Desk)
|
@admin.register(Desk)
|
||||||
|
20
billard/migrations/0009_auto_20170210_1955.py
Normal file
20
billard/migrations/0009_auto_20170210_1955.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.10.5 on 2017-02-10 19:55
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('billard', '0008_auto_20170210_1947'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='locationdata',
|
||||||
|
old_name='table_no',
|
||||||
|
new_name='desk_no',
|
||||||
|
),
|
||||||
|
]
|
@ -10,7 +10,7 @@ from django.db.models.signals import post_save
|
|||||||
|
|
||||||
class LocationData(models.Model):
|
class LocationData(models.Model):
|
||||||
location_id = models.UUIDField(blank=False, null=False, verbose_name="Standort-ID")
|
location_id = models.UUIDField(blank=False, null=False, verbose_name="Standort-ID")
|
||||||
table_no = models.IntegerField(blank=False, null=False, verbose_name="Tischnummer")
|
desk_no = models.IntegerField(blank=False, null=False, verbose_name="Tischnummer")
|
||||||
tst = models.DateTimeField(blank=False, null=False, verbose_name="Zeitstempel")
|
tst = models.DateTimeField(blank=False, null=False, verbose_name="Zeitstempel")
|
||||||
on_off = models.BooleanField(blank=False, null=False, verbose_name="Ein/Ausgebucht")
|
on_off = models.BooleanField(blank=False, null=False, verbose_name="Ein/Ausgebucht")
|
||||||
processed = models.BooleanField(default=False, verbose_name="Verarbeitet")
|
processed = models.BooleanField(default=False, verbose_name="Verarbeitet")
|
||||||
|
2
test-client.py
Executable file → Normal file
2
test-client.py
Executable file → Normal file
@ -17,7 +17,7 @@ def main():
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
payload = {
|
payload = {
|
||||||
'location_id': 'a7b47b4b-5b63-3b2f-8af0-4b185843f419',
|
'location_id': 'a7b47b4b-5b63-3b2f-8af0-4b185843f419',
|
||||||
'table_no': args.desk,
|
'desk_no': args.desk,
|
||||||
'tst': args.date.strftime('%Y-%m-%dT%H:%M:%S%Z')
|
'tst': args.date.strftime('%Y-%m-%dT%H:%M:%S%Z')
|
||||||
}
|
}
|
||||||
if args.on:
|
if args.on:
|
||||||
|
Loading…
Reference in New Issue
Block a user