Created
December 6, 2018 02:59
-
-
Save chason/98c7c56f2b850c7088bfd640fbccc563 to your computer and use it in GitHub Desktop.
Django query to ignore 株式会社 prefix when sorting company names
This file contains 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
Company.objects.all().order_by(Func(F('name'), Value('^株式会社'), Value(''), function='REGEXP_REPLACE')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment