wg-backend-django/acer-env/lib/python3.10/site-packages/django/contrib/postgres/fields/citext.py

24 lines
438 B
Python
Raw Normal View History

2022-11-30 03:58:16 -05:00
from django.db.models import CharField, EmailField, TextField
__all__ = ["CICharField", "CIEmailField", "CIText", "CITextField"]
class CIText:
def get_internal_type(self):
return "CI" + super().get_internal_type()
def db_type(self, connection):
return "citext"
class CICharField(CIText, CharField):
pass
class CIEmailField(CIText, EmailField):
pass
class CITextField(CIText, TextField):
pass