import xadmin
from users.models import VerifyCode
from xadmin import views


class BaseSetting(object):
    # 添加主题功能
    enable_themes = True
    user_bootswatch = True


class GlobalSettings(object):
    # 全局配置，后端管理标题和页脚
    site_title = '天天生鲜后台管理'
    site_footer = 'https://www.qnmlgb.top/'
    # 菜单收缩
    menu_style = 'accordion'


class VerifyCodeAdmin(object):
    list_display = ['code', 'mobile', 'add_time']


xadmin.site.register(VerifyCode, VerifyCodeAdmin)
xadmin.site.register(views.BaseAdminView, BaseSetting)
xadmin.site.register(views.CommAdminView, GlobalSettings)

[((24, 0, 24, 49), 'xadmin.site.register', 'xadmin.site.register', ({(24, 21, 24, 31): 'VerifyCode', (24, 33, 24, 48): 'VerifyCodeAdmin'}, {}), '(VerifyCode, VerifyCodeAdmin)', False, 'import xadmin\n'), ((25, 0, 25, 54), 'xadmin.site.register', 'xadmin.site.register', ({(25, 21, 25, 40): 'views.BaseAdminView', (25, 42, 25, 53): 'BaseSetting'}, {}), '(views.BaseAdminView, BaseSetting)', False, 'import xadmin\n'), ((26, 0, 26, 57), 'xadmin.site.register', 'xadmin.site.register', ({(26, 21, 26, 40): 'views.CommAdminView', (26, 42, 26, 56): 'GlobalSettings'}, {}), '(views.CommAdminView, GlobalSettings)', False, 'import xadmin\n')]