流沙团
django 测试filter 失效 (过滤器失效)
2022-8-16 流沙团

)### 版本检查


Package              Version
-------------------- ---------
asgiref 3.5.2
certifi 2022.6.15
charset-normalizer 2.1.0
coreapi 2.3.3
coreschema 0.0.4
defusedxml 0.7.1
diff-match-patch 20200713
Django 3.2
django-crispy-forms 1.8.1
django-filter 22.1
django-formtools 2.2
django-guardian 2.4.0
django-import-export 2.8.0
django-reversion 2.0.0
djangorestframework 3.13.1
et-xmlfile 1.1.0
future 0.15.2
httplib2 0.9.2
idna 3.3
itypes 1.2.0
Jinja2 3.1.2
MarkupPy 1.14
MarkupSafe 2.1.1
mysqlclient 2.1.1
odfpy 1.4.1
openpyxl 3.0.10
Pillow 9.2.0
pip 21.1.2
pytz 2022.2.1
PyYAML 6.0
requests 2.28.1
setuptools 57.0.0
six 1.10.0
sqlparse 0.4.2
tablib 3.2.1
uritemplate 4.1.1
urllib3 1.26.11
wheel 0.36.2
xlrd 2.0.1
xlwt 1.3.0
`

filter的关键字设置

# filter_fields = ('name', 'shop_price')
filterset_fields = ('name', 'shop_price')
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容