Here are the examples of the python api django.db.models.BigIntegerField taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
5 Examples
3
View Complete Implementation : tests.py
Copyright GNU Affero General Public License v3.0
Author : nesdis
Copyright GNU Affero General Public License v3.0
Author : nesdis
def test_big_integer_field(self):
field = models.BigIntegerField()
name, path, args, kwargs = field.deconstruct()
self.astertEqual(path, "django.db.models.BigIntegerField")
self.astertEqual(args, [])
self.astertEqual(kwargs, {})
3
View Complete Implementation : models.py
Copyright MIT License
Author : wagtail
Copyright MIT License
Author : wagtail
def annotate_typed_pk(self):
cast_field = self.model._meta.pk
if isinstance(cast_field, BigAutoField):
cast_field = BigIntegerField()
elif isinstance(cast_field, AutoField):
cast_field = IntegerField()
return self.annotate(typed_pk=Cast('object_id', cast_field))
0
View Complete Implementation : test_converter.py
Copyright MIT License
Author : graphql-python
Copyright MIT License
Author : graphql-python
def test_should_big_integer_convert_int():
astert_conversion(models.BigIntegerField, graphene.Int)
0
View Complete Implementation : testmethod_perf.py
Copyright BSD 3-Clause "New" or "Revised" License
Author : SFDO-Tooling
Copyright BSD 3-Clause "New" or "Revised" License
Author : SFDO-Tooling
def AsInt(expr):
return Cast(expr, BigIntegerField())
0
View Complete Implementation : fields.py
Copyright MIT License
Author : xtrinch
Copyright MIT License
Author : xtrinch
def run_validators(self, value):
# make sure validation is performed on integer value not string value
value = _hex_string_to_unsigned_integer(value)
return super(models.BigIntegerField, self).run_validators(value)