26 lines
939 B
Python
26 lines
939 B
Python
from django.contrib import admin
|
|
from .models import *
|
|
|
|
|
|
@admin.register(Location)
|
|
class LocationAdmin(admin.ModelAdmin):
|
|
list_display = ('code', 'name', 'city',)
|
|
fields = ['users', 'code', 'name', 'street', 'plz', 'city', 'phone', 'email', 'url', ]
|
|
|
|
|
|
@admin.register(Client)
|
|
class ClientAdmin(admin.ModelAdmin):
|
|
list_display = ('uuid', 'desk1_name', 'desk2_name')
|
|
fields = ['location', 'uuid', 'desk1_enable', 'desk1_name', 'desk1_prize_nt', 'desk1_prize_ht', 'desk2_enable', 'desk2_name', 'desk2_prize_nt', 'desk2_prize_ht', ]
|
|
|
|
|
|
@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']
|
|
|
|
|
|
@admin.register(Accounting)
|
|
class AccountingAdmin(admin.ModelAdmin):
|
|
list_display = ('client', 'desk_no', 'time_from', 'time_to', 'prize')
|