Created
June 1, 2017 16:22
-
-
Save mathjazz/03fe9ad3352d1e7ecaaa6f81628b848b to your computer and use it in GitHub Desktop.
Current.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| entities = ( | |
| Entity.objects.filter( | |
| Q(translation__string__icontains_collate=search_query, translation__locale=locale) | Q(translation__entity_document__icontains=search), | |
| pk__in=entities | |
| ) | |
| .distinct() | |
| ) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What if we replace
translation__entity_document__icontainswithentity_document__icontains(and moveentity_documentto the Entity model)?