File: lookups.py

package info (click to toggle)
djangorestframework-filters 0.10.2.post0-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 268 kB
  • sloc: python: 1,714; makefile: 5
file content (9 lines) | stat: -rw-r--r-- 296 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
from django.db.models import Transform


# This is a copy of the `Unaccent` transform from `django.contrib.postgres`.
# This is necessary as the postgres app requires psycopg2 to be installed.
class Unaccent(Transform):
    bilateral = True
    lookup_name = 'unaccent'
    function = 'UNACCENT'