一、修改xadmin.py代码
#_*_encoding:utf-8_*_
__author__ = 'wuhuhuan'
__date__ = '2020/4/12 9:11'import xadmin
from .models import EmailVerifyRecordclass EmailVerifyRecordAmin(object):#查询结果字段list_display = ['code', 'email', 'send_type', 'send_Time']#搜索框search_fields=['code', 'email', 'send_type']# 过滤框list_filter=['code', 'email', 'send_type', 'send_Time']xadmin.site.register(EmailVerifyRecord,EmailVerifyRecordAmin)
查询结果字段效果:
搜索框效果:
过滤框效果: