Case sensitive search in Django, but ignored in Mysql
问题 I have a field in a Django Model for storing a unique (hash) value. Turns out that the database (MySQL/inno) doesn't do a case sensitive search on this type (VARCHAR), not even if I explicitly tell Django to do a case sensitive search Document.objects.get(hash__exact="abcd123") . So "abcd123" and "ABcd123" are both returned, which I don't want. class document(models.Model): filename = models.CharField(max_length=120) hash = models.CharField(max_length=33 ) I can change the 'hash field' to a