Ticket #1477: URLField-db-maxlength.diff
File URLField-db-maxlength.diff, 3.3 KB (added by , 18 years ago) |
---|
-
django/db/models/fields/__init__.py
766 766 val = self._get_val_from_obj(obj) 767 767 return {self.attname: (val is not None and val.strftime("%H:%M:%S") or '')} 768 768 769 class URLField( Field):769 class URLField(CharField): 770 770 def __init__(self, verbose_name=None, name=None, verify_exists=True, **kwargs): 771 kwargs['maxlength'] = kwargs.get('maxlength', 200) 771 772 if verify_exists: 772 773 kwargs.setdefault('validator_list', []).append(validators.isExistingURL) 773 Field.__init__(self, verbose_name, name, **kwargs)774 CharField.__init__(self, verbose_name, name, **kwargs) 774 775 775 776 def get_manipulator_field_objs(self): 776 777 return [forms.URLField] 777 778 779 def get_internal_type(self): 780 return "CharField" 781 778 782 class USStateField(Field): 779 783 def get_manipulator_field_objs(self): 780 784 return [forms.USStateField] -
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 }