问题:
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