django_filters
rest_framework原生filter使用
# settings.py
REST_FRAMEWORK = {
'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend', )
}
# app/views.py
class GoodsViewSet(ListModelMixin, vi...
原创
2020-01-09 11:28:19 ·
435 阅读 ·
0 评论