Django的filter查詢


Django的filter查詢

name__contains表示精確大小寫的模糊查詢

使用name__icontains表示忽略大小寫

year_count = DownloadFile.objects.filter(date__contains='2018').count()
year_up_rate=round((year_count-DownloadFile.objects.filter(date__contains='2017').count())/1000)


免責聲明!

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



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