#-*- coding:utf-8 -*-
# Author: Zhu Chen 
# Organization: 07 LP detection group
# Create Time: 2020/03  All rights reserved
import xadmin
from .models import  Image, Car

class CarAdmin(object):
    list_display = ['plate', 'confidence', 'brand', 'color', 'p1','p2','p3','p4','create_time']
    search_fields = ['plate', 'brand', 'color']
    list_filter = ['plate', 'brand', 'color', 'create_time']

class ImageAdmin(object):
    list_display = ['user','car', 'source' ,'desc', 'create_time' ]
    search_fields = ['user','car', 'source' ,'desc']
    list_filter = ['user','car', 'source' ,'desc', 'create_time' ]

# class Car1Admin(object):
#     pass

# xadmin.site.register(Car, CarAdmin)
xadmin.site.register(Image, ImageAdmin)

xadmin.site.register(Car, CarAdmin)