-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignorer les accents dans les recherches dans Django admin (#1108)
- Loading branch information
1 parent
c219fc4
commit f78617d
Showing
3 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from django.contrib.postgres.lookups import Unaccent | ||
from django.db.models import CharField, TextField | ||
|
||
# Useful to support unaccent lookups in django admin, for | ||
# acteurs and produits for example | ||
CharField.register_lookup(Unaccent) | ||
TextField.register_lookup(Unaccent) |
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
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