Ticket #1477: URLField-db-maxlength-4293.diff
File URLField-db-maxlength-4293.diff, 3.4 KB (added by , 18 years ago) |
---|
-
django/db/models/fields/__init__.py
800 800 def formfield(self, initial=None): 801 801 return forms.TimeField(required=not self.blank, label=capfirst(self.verbose_name), initial=initial) 802 802 803 class URLField( Field):803 class URLField(CharField): 804 804 def __init__(self, verbose_name=None, name=None, verify_exists=True, **kwargs): 805 kwargs['maxlength'] = kwargs.get('maxlength', 200) 805 806 if verify_exists: 806 807 kwargs.setdefault('validator_list', []).append(validators.isExistingURL) 807 808 self.verify_exists = verify_exists 808 Field.__init__(self, verbose_name, name, **kwargs)809 CharField.__init__(self, verbose_name, name, **kwargs) 809 810 810 811 def get_manipulator_field_objs(self): 811 812 return [oldforms.URLField] 812 813 814 def get_internal_type(self): 815 return "CharField" 816 813 817 def formfield(self, initial=None): 814 818 return forms.URLField(required=not self.blank, verify_exists=self.verify_exists, label=capfirst(self.verbose_name), initial=initial) 815 819 -
django/db/backends/ado_mssql/creation.py
21 21 'SmallIntegerField': 'smallint', 22 22 'TextField': 'text', 23 23 'TimeField': 'time', 24 'URLField': 'varchar(200)',25 24 'USStateField': 'varchar(2)', 26 25 } -
django/db/backends/postgresql/creation.py
25 25 'SmallIntegerField': 'smallint', 26 26 'TextField': 'text', 27 27 'TimeField': 'time', 28 'URLField': 'varchar(200)',29 28 'USStateField': 'varchar(2)', 30 29 } -
django/db/backends/sqlite3/creation.py
24 24 'SmallIntegerField': 'smallint', 25 25 'TextField': 'text', 26 26 'TimeField': 'time', 27 'URLField': 'varchar(200)',28 27 'USStateField': 'varchar(2)', 29 28 } -
django/db/backends/mysql/creation.py
25 25 'SmallIntegerField': 'smallint', 26 26 'TextField': 'longtext', 27 27 'TimeField': 'time', 28 'URLField': 'varchar(200)',29 28 'USStateField': 'varchar(2)', 30 29 } -
django/db/backends/oracle/creation.py
21 21 'SmallIntegerField': 'smallint', 22 22 'TextField': 'long', 23 23 'TimeField': 'timestamp', 24 'URLField': 'varchar(200)',25 24 'USStateField': 'varchar(2)', 26 25 }