問題:
How can I query/filter in Django and ignore the cases of my query-string?如何在 Django 中查詢/過濾並忽略查詢字符串的情況?
I've got something like and like to ignore the case of my_parameter
:我有類似並且喜歡忽略my_parameter
的情況:
MyClass.objects.filter(name=my_parameter)
解決方案:
參考一: https://stackoom.com/question/nGwZ參考二: Django Model - Case-insensitive Query / Filtering