django.db.models IntegerField Example Code

IntegerField is a Django ORM mapping from your Python code to an integer-type column in your relational database.

The Django project has wonderful documentation for IntegerField as well as all of the other column fields.

Note that IntegerField is defined within the django.db.models.fields module but is typically referenced from django.db.models rather than including the fields module reference.

Example 1 from AuditLog

Auditlog (project documentation) is a Django app that logs changes to Python objects, similar to the Django admin's logs but with more details and output formats. Auditlog's source code is provided as open source under the MIT license.

AuditLog / src / auditlog_tests / models.py

Example 2 from dccnsys

dccnsys is a conference registration system built with Django. The code is open source under the MIT license.

dccnsys / wwwdccn / users / models.py

Example 3 from wagtail

wagtail (project website) is a fantastic Django-based CMS with code that is open source under the BSD 3-Clause "New" or "Revised" License.

wagtail / wagtail/core / models.py