mirror of https://github.com/django/django.git
Gave EmailField a get_internal_type() method and removed it from DATA_TYPES in all the database backends
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9347f748b0
commit
d778326c52
|
@ -138,7 +138,6 @@ DATA_TYPES = {
|
|||
'CommaSeparatedIntegerField': 'varchar(%(maxlength)s)',
|
||||
'DateField': 'smalldatetime',
|
||||
'DateTimeField': 'smalldatetime',
|
||||
'EmailField': 'varchar(75)',
|
||||
'FileField': 'varchar(100)',
|
||||
'FilePathField': 'varchar(100)',
|
||||
'FloatField': 'numeric(%(max_digits)s, %(decimal_places)s)',
|
||||
|
|
|
@ -154,7 +154,6 @@ DATA_TYPES = {
|
|||
'CommaSeparatedIntegerField': 'varchar(%(maxlength)s)',
|
||||
'DateField': 'date',
|
||||
'DateTimeField': 'datetime',
|
||||
'EmailField': 'varchar(75)',
|
||||
'FileField': 'varchar(100)',
|
||||
'FilePathField': 'varchar(100)',
|
||||
'FloatField': 'numeric(%(max_digits)s, %(decimal_places)s)',
|
||||
|
|
|
@ -159,7 +159,6 @@ DATA_TYPES = {
|
|||
'CommaSeparatedIntegerField': 'varchar(%(maxlength)s)',
|
||||
'DateField': 'date',
|
||||
'DateTimeField': 'timestamp with time zone',
|
||||
'EmailField': 'varchar(75)',
|
||||
'FileField': 'varchar(100)',
|
||||
'FilePathField': 'varchar(100)',
|
||||
'FloatField': 'numeric(%(max_digits)s, %(decimal_places)s)',
|
||||
|
|
|
@ -157,7 +157,6 @@ DATA_TYPES = {
|
|||
'CommaSeparatedIntegerField': 'varchar(%(maxlength)s)',
|
||||
'DateField': 'date',
|
||||
'DateTimeField': 'datetime',
|
||||
'EmailField': 'varchar(75)',
|
||||
'FileField': 'varchar(100)',
|
||||
'FilePathField': 'varchar(100)',
|
||||
'FloatField': 'numeric(%(max_digits)s, %(decimal_places)s)',
|
||||
|
|
|
@ -390,6 +390,13 @@ class DateTimeField(DateField):
|
|||
return self.get_default()
|
||||
|
||||
class EmailField(Field):
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs['maxlength'] = 75
|
||||
Field.__init__(self, *args, **kwargs)
|
||||
|
||||
def get_internal_type(self):
|
||||
return "CharField"
|
||||
|
||||
def get_manipulator_field_objs(self):
|
||||
return [formfields.EmailField]
|
||||
|
||||
|
|
Loading…
Reference in New Issue