Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit d778326c52701579281f633c8115d9c836e09d58 1 parent 9347f74
Adrian Holovaty adrianholovaty authored
1  django/core/db/backends/ado_mssql.py
View
@@ -138,7 +138,6 @@ def get_relations(cursor, table_name):
'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)',
1  django/core/db/backends/mysql.py
View
@@ -154,7 +154,6 @@ def get_relations(cursor, table_name):
'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)',
1  django/core/db/backends/postgresql.py
View
@@ -159,7 +159,6 @@ def get_relations(cursor, table_name):
'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)',
1  django/core/db/backends/sqlite3.py
View
@@ -157,7 +157,6 @@ def get_relations(cursor, table_name):
'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)',
7 django/core/meta/fields.py
View
@@ -390,6 +390,13 @@ def get_manipulator_new_data(self, new_data, rel=False):
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]
Please sign in to comment.
Something went wrong with that request. Please try again.