Ticket #399: 399.diff
File 399.diff, 5.1 KB (added by , 18 years ago) |
---|
-
django/contrib/admin/views/doc.py
=== modified file 'django/contrib/admin/views/doc.py'
301 301 'ForeignKey' : _('Integer'), 302 302 'ImageField' : _('File path'), 303 303 'IntegerField' : _('Integer'), 304 'BigIntegerField' : _('Integer'), 304 305 'IPAddressField' : _('IP address'), 305 306 'ManyToManyField' : '', 306 307 'NullBooleanField' : _('Boolean (Either True, False or None)'), 307 308 'OneToOneField' : _('Relation to parent model'), 308 309 'PhoneNumberField' : _('Phone number'), 309 310 'PositiveIntegerField' : _('Integer'), 311 'PositiveBigIntegerField' : _('Integer'), 310 312 'PositiveSmallIntegerField' : _('Integer'), 311 313 'SlugField' : _('String (up to %(maxlength)s)'), 312 314 'SmallIntegerField' : _('Integer'), -
django/db/backends/mysql/creation.py
=== modified file 'django/db/backends/mysql/creation.py'
14 14 'FloatField': 'numeric(%(max_digits)s, %(decimal_places)s)', 15 15 'ImageField': 'varchar(100)', 16 16 'IntegerField': 'integer', 17 'BigIntegerField': 'bigint', 17 18 'IPAddressField': 'char(15)', 18 19 'ManyToManyField': None, 19 20 'NullBooleanField': 'bool', 20 21 'OneToOneField': 'integer', 21 22 'PhoneNumberField': 'varchar(20)', 22 23 'PositiveIntegerField': 'integer UNSIGNED', 24 'PositiveBigIntegerField': 'bigint UNSIGNED', 23 25 'PositiveSmallIntegerField': 'smallint UNSIGNED', 24 26 'SlugField': 'varchar(%(maxlength)s)', 25 27 'SmallIntegerField': 'smallint', -
django/db/backends/mysql/introspection.py
=== modified file 'django/db/backends/mysql/introspection.py'
83 83 FIELD_TYPE.FLOAT: 'FloatField', 84 84 FIELD_TYPE.INT24: 'IntegerField', 85 85 FIELD_TYPE.LONG: 'IntegerField', 86 FIELD_TYPE.LONGLONG: ' IntegerField',86 FIELD_TYPE.LONGLONG: 'BigIntegerField', 87 87 FIELD_TYPE.SHORT: 'IntegerField', 88 88 FIELD_TYPE.STRING: 'CharField', 89 89 FIELD_TYPE.TIMESTAMP: 'DateTimeField', -
django/db/models/fields/__init__.py
=== modified file 'django/db/models/fields/__init__.py'
729 729 defaults.update(kwargs) 730 730 return super(IntegerField, self).formfield(**defaults) 731 731 732 class BigIntegerField(IntegerField): 733 def get_manipulator_field_objs(self): 734 return [oldforms.BigIntegerField] 735 736 class PositiveBigIntegerField(IntegerField): 737 def get_manipulator_field_objs(self): 738 return [oldforms.PositiveBigIntegerField] 739 732 740 class IPAddressField(Field): 733 741 def __init__(self, *args, **kwargs): 734 742 kwargs['maxlength'] = 15 -
django/oldforms/__init__.py
=== modified file 'django/oldforms/__init__.py'
749 749 if not 0 <= int(field_data) <= 32767: 750 750 raise validators.CriticalValidationError, gettext("Enter a whole number between 0 and 32,767.") 751 751 752 class BigIntegerField(IntegerField): 753 def __init__(self, field_name, length=20, maxlength=None, is_required=False, validator_list=None, member_name=None): 754 if validator_list is None: validator_list = [] 755 validator_list = [self.isInteger] + validator_list 756 if member_name is not None: 757 self.member_name = member_name 758 IntegerField.__init__(self, field_name, length, maxlength, is_required, validator_list) 759 760 class PositiveBigIntegerField(PositiveIntegerField): 761 def __init__(self, field_name, length=20, maxlength=None, is_required=False, validator_list=None): 762 if validator_list is None: validator_list = [] 763 validator_list = [self.isPositive] + validator_list 764 IntegerField.__init__(self, field_name, length, maxlength, is_required, validator_list) 765 752 766 class FloatField(TextField): 753 767 def __init__(self, field_name, max_digits, decimal_places, is_required=False, validator_list=None): 754 768 if validator_list is None: validator_list = [] -
docs/model-api.txt
=== modified file 'docs/model-api.txt'
126 126 automatically be added to your model if you don't specify otherwise. See 127 127 `Automatic primary key fields`_. 128 128 129 ``BigIntegerField`` 130 ~~~~~~~~~~~~~~~~ 131 132 A big integer. 133 134 The admin represents this as an ``<input type="text">`` (a single-line input). 135 136 It like an ``IntegerField``, except that it fits bigger numbers. 137 129 138 ``BooleanField`` 130 139 ~~~~~~~~~~~~~~~~ 131 140 … … 353 362 A ``CharField`` that checks that the value is a valid U.S.A.-style phone 354 363 number (in the format ``XXX-XXX-XXXX``). 355 364 365 ``PositiveBigIntegerField`` 366 ~~~~~~~~~~~~~~~~ 367 368 Just like a ``BigIntegerField``, but must be positive. 369 356 370 ``PositiveIntegerField`` 357 371 ~~~~~~~~~~~~~~~~~~~~~~~~ 358 372