Kaydet (Commit) d778326c authored tarafından Adrian Holovaty's avatar Adrian Holovaty

Gave EmailField a get_internal_type() method and removed it from DATA_TYPES in…

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
üst 9347f748
......@@ -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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment