diff --git a/billard/admin.py b/billard/admin.py index 22c7220..7e261cf 100644 --- a/billard/admin.py +++ b/billard/admin.py @@ -16,8 +16,8 @@ class ClientAdmin(admin.ModelAdmin): @admin.register(LocationData) class LocationDataAdmin(admin.ModelAdmin): - list_display = ('location_id', 'table_no', 'tst', 'on_off', 'processed', 'error_msg') - fields = ['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', 'desk_no', 'tst', 'on_off', 'processed', 'error_msg'] @admin.register(Desk) diff --git a/billard/migrations/0009_auto_20170210_1955.py b/billard/migrations/0009_auto_20170210_1955.py new file mode 100644 index 0000000..4bfb974 --- /dev/null +++ b/billard/migrations/0009_auto_20170210_1955.py @@ -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', + ), + ] diff --git a/billard/models.py b/billard/models.py index a8466c0..c2d9ed0 100644 --- a/billard/models.py +++ b/billard/models.py @@ -10,7 +10,7 @@ from django.db.models.signals import post_save class LocationData(models.Model): 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") on_off = models.BooleanField(blank=False, null=False, verbose_name="Ein/Ausgebucht") processed = models.BooleanField(default=False, verbose_name="Verarbeitet") diff --git a/test-client.py b/test-client.py old mode 100755 new mode 100644 index b00427f..fa3581e --- a/test-client.py +++ b/test-client.py @@ -17,7 +17,7 @@ def main(): args = parser.parse_args() payload = { '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') } if args.on: