rename table_no to desk_no
This commit is contained in:
parent
d516d830b6
commit
263bff6540
@ -16,8 +16,8 @@ class ClientAdmin(admin.ModelAdmin):
|
||||
|
||||
@admin.register(LocationData)
|
||||
class LocationDataAdmin(admin.ModelAdmin):
|
||||
list_display = ('location_id', 'desk_no', 'tst', 'on_off', 'processed', 'error_msg')
|
||||
fields = ['location_id', 'desk_no', 'tst', 'on_off', 'processed', 'error_msg']
|
||||
list_display = ('client_id', 'desk_no', 'tst', 'on_off', 'processed', 'error_msg')
|
||||
fields = ['client_id', 'desk_no', 'tst', 'on_off', 'processed', 'error_msg']
|
||||
|
||||
|
||||
@admin.register(Desk)
|
||||
|
20
billard/migrations/0010_auto_20170210_2040.py
Normal file
20
billard/migrations/0010_auto_20170210_2040.py
Normal file
@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.5 on 2017-02-10 19:40
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('billard', '0009_auto_20170210_1955'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='locationdata',
|
||||
old_name='location_id',
|
||||
new_name='client_id',
|
||||
),
|
||||
]
|
@ -2,14 +2,14 @@ import uuid
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
from datetime import datetime, timezone
|
||||
from . import utils
|
||||
from . import tasks
|
||||
from billard import utils
|
||||
from django.contrib.auth.models import User
|
||||
from django.db.models.signals import post_save
|
||||
from django.dispatch import receiver
|
||||
|
||||
|
||||
class LocationData(models.Model):
|
||||
location_id = models.UUIDField(blank=False, null=False, verbose_name="Standort-ID")
|
||||
client_id = models.UUIDField(blank=False, null=False, verbose_name="Client-ID")
|
||||
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")
|
||||
@ -17,7 +17,7 @@ class LocationData(models.Model):
|
||||
error_msg = models.TextField(blank=True, null=True, verbose_name="Fehlermeldung")
|
||||
|
||||
def __str__(self):
|
||||
return str(self.location_id)
|
||||
return str(self.client_id)
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Standortlog"
|
||||
@ -98,7 +98,6 @@ class Accounting(models.Model):
|
||||
verbose_name_plural = "Buchhaltungseinträge"
|
||||
|
||||
|
||||
def update_location_data(sender, instance, **kwargs):
|
||||
tasks.process_location_data.delay()
|
||||
|
||||
post_save.connect(update_location_data, sender=LocationData)
|
||||
@receiver(post_save, sender=LocationData)
|
||||
def test(sender, **kwargs):
|
||||
print('test')
|
||||
|
Loading…
Reference in New Issue
Block a user