django.db.models AutoField Example Code

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

The Django project has great documentation for AutoField as well as all of the other column fields.

Note that AutoField 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 django-axes

django-axes (project documentation and PyPI package information is a code library for Django projects to track failed login attempts against a web application. The goal of the project is to make it easier for you to stop people and scripts from hacking your Django-powered website.

The code for django-axes is open source under the MIT license and maintained by the group of developers known as Jazzband.

django-axes / axes / migrations / 0001_initial.py