django.contrib.postgres.fields.citext 源代码

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