We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug描述 简单的描述下遇到的bug:
class EcpidFilter(admin.SimpleListFilter): title = _('是否已加密id') parameter_name = 'ecpid' def lookups(self, request, model_admin): # 第一个对应查询参数的值,第二个对应下拉列表选项 return ( ('0', _('未加密')), ('1', _('已加密')), ) def queryset(self, request, queryset): if self.value() == '0': return queryset.filter(ecpid__isnull=True).all() elif self.value() == '1': return queryset.filter(ecpid__isnull=False).all()
admin中自定义字段过滤报错
list_filter = ['author', EcpidFilter]
环境
1.操作系统: 2.python版本:3.7 3.django版本:2.1 4.simpleui版本:2.1
The text was updated successfully, but these errors were encountered:
这个问题我也发现了,稍后我看看,会针对此问题进行修复,下个版本会修复这个问题。
Sorry, something went wrong.
#48 #52 修复自定义Filter报错
f77a986
已经修复此bug,请升级到2.1.1
No branches or pull requests
bug描述
简单的描述下遇到的bug:
admin中自定义字段过滤报错
环境
1.操作系统:
2.python版本:3.7
3.django版本:2.1
4.simpleui版本:2.1
The text was updated successfully, but these errors were encountered: