from django.contrib import admin
from .models import *
# Register your models here.

# class BqtDetailsInline(admin.TabularInline):
class BqtDetailsInline(admin.StackedInline):
    model=XfBqtDetails
    fields = ('label_code', 'fh_key', 'delivery_details_id',)
    extra=1


class XfBqtAdmin(admin.ModelAdmin):
    list_display = ('subject', 'department','code', 'salesman', 'location', 'scene_img', 'host', 'host_tel', 'tm', 'qty', 'remark')
    search_fields = ('subject',)
    inlines = [BqtDetailsInline]
admin.site.register(XfBanquet, XfBqtAdmin)