carom-server/billard/admin.py

31 lines
920 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', 'location')
fields = ['location', 'uuid']
@admin.register(LocationData)
class LocationDataAdmin(admin.ModelAdmin):
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)
class DeskAdmin(admin.ModelAdmin):
list_display = ('client', 'desk_no', 'name', 'enabled', 'prize', 'prize_hh')
@admin.register(Accounting)
class AccountingAdmin(admin.ModelAdmin):
list_display = ('desk', 'time_from', 'time_to', 'prize', 'billed')