#!/usr/bin/env python
#coding:utf-8
import xadmin

__author__ = 'Luodi'

from .models import  CityDict,CourseOrg,Teacher

class CityDictAdmin(object):
    list_display = ['name', 'desc', 'add_time']
    search_fields = ['name', 'desc', ]
    list_filter =  ['name', 'desc', 'add_time']

class CourseOrgAdmin(object):

    list_display = ['name', 'desc', 'click_nums', 'fav_nums', 'image', 'address', 'city', 'add_time']
    search_fields = ['name', 'click_nums', 'city', 'address']
    list_filter = ['name', 'desc', 'click_nums', 'fav_nums', 'image', 'address', 'city', 'add_time']

class TeacherAdmin(object):

    list_display = ['name', 'work_years', 'work_company',  'points', 'click_nums', 'fav_nums', 'add_time']
    search_fields = ['name', 'work_company', ]
    list_filter = ['name', 'work_years', 'work_company',  'points', 'click_nums', 'fav_nums', 'add_time']


xadmin.site.register(CityDict, CityDictAdmin)
xadmin.site.register(CourseOrg, CourseOrgAdmin)
xadmin.site.register(Teacher, TeacherAdmin)




