django的過濾和搜索排序功能django-filter


參考:

1、https://django-filter.readthedocs.io/en/master/guide/usage.html#the-filter

2、https://www.cnblogs.com/neozheng/p/9838440.html

3、https://zhuanlan.zhihu.com/p/47836057

4、https://www.jianshu.com/p/f3606a5def69

效果見swagger文檔,api文檔未配置成功

 

使用的插件版本

# 20181207最新版本
# todo? 這個ide提示錯誤不知道如何規避,必須是==
django==2.1.4
ipython==7.2.0
mysqlclient==1.3.14
django-rest-swagger==2.2.0
kafka-python==1.4.4
djangorestframework==3.9.0
djangorestframework-filters==0.10.2.post0
# 增強restful的過濾功能
django-filter==2.0.0   # 增加api文檔的過濾功能,在swagger的文檔里能看到效果:https://django-filter.readthedocs.io/en/master/guide/rest_framework.html
#django-crispy-forms==1.7.2  # 優化前端顯示:https://django-crispy-forms.readthedocs.io/en/latest/install.html#installing-django-crispy-forms
#django-filters==0.2.1 # 不知道和django-filter有什么區別
# todo 怎么用?
#markdown==3.0.1        # Markdown support for the browsable API.

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM