按照需求定制admin,修改了119页内容后(blog/admin.py中list_filter=[CategoryOwnerFilter]上述内容已全部修改),运行报错,具体报错内容为:“class CategoryOwnerFilter(admin.SimpleListFilter):
File "/opt/anaconda3/lib/python3.7/site-packages/django/contrib/admin/decorators.py", line 25, in _model_admin_wrapper
raise ValueError('Wrapped class must subclass ModelAdmin.')
ValueError: Wrapped class must subclass ModelAdmin.“
是否和为本地配置的环境有关,有劳作者方便的时候,抽空指导一下,这个问题在其他论坛,未能成功找到解决办法,如能获得您的回复,不胜感激!!
按照需求定制admin,修改了119页内容后(blog/admin.py中list_filter=[CategoryOwnerFilter]上述内容已全部修改),运行报错,具体报错内容为:“class CategoryOwnerFilter(admin.SimpleListFilter): File "/opt/anaconda3/lib/python3.7/site-packages/django/contrib/admin/decorators.py", line 25, in _model_admin_wrapper raise ValueError('Wrapped class must subclass ModelAdmin.') ValueError: Wrapped class must subclass ModelAdmin.“ 是否和为本地配置的环境有关,有劳作者方便的时候,抽空指导一下,这个问题在其他论坛,未能成功找到解决办法,如能获得您的回复,不胜感激!!