mirror of https://github.com/sgoudham/Enso-Bot.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
439 B
Python
25 lines
439 B
Python
5 years ago
|
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
|