Ticket #399: django-bigint-20070712.patch
File django-bigint-20070712.patch, 7.4 KB (added by , 17 years ago) |
---|
-
django/oldforms/__init__.py
759 759 if not 0 <= int(field_data) <= 32767: 760 760 raise validators.CriticalValidationError, ugettext("Enter a whole number between 0 and 32,767.") 761 761 762 class BigIntegerField(IntegerField): 763 def __init__(self, field_name, length=20, maxlength=None, is_required=False, validator_list=None, member_name=None): 764 if validator_list is None: validator_list = [] 765 validator_list = [self.isInteger] + validator_list 766 if member_name is not None: 767 self.member_name = member_name 768 IntegerField.__init__(self, field_name, length, maxlength, is_required, validator_list) 769 762 770 class FloatField(TextField): 763 771 def __init__(self, field_name, is_required=False, validator_list=None): 764 772 if validator_list is None: validator_list = [] -
django/db/models/fields/__init__.py
800 800 defaults.update(kwargs) 801 801 return super(IntegerField, self).formfield(**defaults) 802 802 803 class BigIntegerField(IntegerField): 804 empty_strings_allowed = False 805 def get_manipulator_field_objs(self): 806 return [oldforms.BigIntegerField] 807 803 808 class IPAddressField(Field): 804 809 empty_strings_allowed = False 805 810 def __init__(self, *args, **kwargs): -
django/db/backends/ado_mssql/creation.py
11 11 'FloatField': 'double precision', 12 12 'ImageField': 'varchar(100)', 13 13 'IntegerField': 'int', 14 'BigIntegerField': 'bigint', 14 15 'IPAddressField': 'char(15)', 15 16 'ManyToManyField': None, 16 17 'NullBooleanField': 'bit', -
django/db/backends/postgresql/introspection.py
69 69 # Maps type codes to Django Field types. 70 70 DATA_TYPES_REVERSE = { 71 71 16: 'BooleanField', 72 20: 'BigIntegerField', 72 73 21: 'SmallIntegerField', 73 74 23: 'IntegerField', 74 75 25: 'TextField', -
django/db/backends/postgresql/creation.py
15 15 'FloatField': 'double precision', 16 16 'ImageField': 'varchar(100)', 17 17 'IntegerField': 'integer', 18 'BigIntegerField': 'bigint', 18 19 'IPAddressField': 'inet', 19 20 'ManyToManyField': None, 20 21 'NullBooleanField': 'boolean', -
django/db/backends/sqlite3/introspection.py
62 62 'smallinteger': 'SmallIntegerField', 63 63 'int': 'IntegerField', 64 64 'integer': 'IntegerField', 65 'bigint': 'BigIntegerField', 65 66 'text': 'TextField', 66 67 'char': 'CharField', 67 68 'date': 'DateField', -
django/db/backends/sqlite3/creation.py
14 14 'FloatField': 'real', 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', -
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/backends/mysql/creation.py
15 15 'FloatField': 'double precision', 16 16 'ImageField': 'varchar(100)', 17 17 'IntegerField': 'integer', 18 'BigIntegerField': 'bigint', 18 19 'IPAddressField': 'char(15)', 19 20 'ManyToManyField': None, 20 21 'NullBooleanField': 'bool', -
django/db/backends/oracle/creation.py
18 18 'FloatField': 'DOUBLE PRECISION', 19 19 'ImageField': 'NVARCHAR2(100)', 20 20 'IntegerField': 'NUMBER(11)', 21 'BigIntegerField': 'NUMBER(19)', 21 22 'IPAddressField': 'VARCHAR2(15)', 22 23 'ManyToManyField': None, 23 24 'NullBooleanField': 'NUMBER(1) CHECK ((%(column)s IN (0,1)) OR (%(column)s IS NULL))', -
django/db/backends/postgresql_psycopg2/introspection.py
69 69 # Maps type codes to Django Field types. 70 70 DATA_TYPES_REVERSE = { 71 71 16: 'BooleanField', 72 20: 'BigIntegerField', 72 73 21: 'SmallIntegerField', 73 74 23: 'IntegerField', 74 75 25: 'TextField', -
django/contrib/admin/views/doc.py
303 303 'ForeignKey' : _('Integer'), 304 304 'ImageField' : _('File path'), 305 305 'IntegerField' : _('Integer'), 306 'BigIntegerField' : _('Integer'), 306 307 'IPAddressField' : _('IP address'), 307 308 'ManyToManyField' : '', 308 309 'NullBooleanField' : _('Boolean (Either True, False or None)'), -
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 A 64 bit type like an ``IntegerField``, except that it fits numbers from 137 -9223372036854775808 to 9223372036854775807 138 129 139 ``BooleanField`` 130 140 ~~~~~~~~~~~~~~~~ 131 141