from lxml import etree报错

时间:2024-11-18 17:48:35
Django 一个 model 注册多个 admin 表

神之蛋蛋: 大佬,为何我这样写,admin并么有出现2个页面,只有一个[code=python] ############################## : class qe_need(): shifou = (('Y', 'Y'), ('N', 'N')) 是否全T_sheet = (verbose_name='是否全T-sheet:', max_length=2, choices=shifou, null=True, blank=True) 验证重点 = (verbose_name = '验证重点(QE需求/pattern/亮度):', max_length=500, null=True, blank=True) class qe_need_filtered(qe_need): class Meta: proxy = True verbose_name = 'qe_needs' verbose_name_plural = 'qe_needs' ############################ : class need(ImportExportModelAdmin): list_display = ['是否全T_sheet', '验证重点'] ( qe_need, need ) class NeedFilterByNoFullTSheet(ImportExportModelAdmin): def get_queryset(self, request): qs = super(NeedFilterByNoFullTSheet,self).get_queryset(request) return (是否全T_sheet='N') (qe_need_filtered,NeedFilterByNoFullTSheet) ######################### [/code]