Django data fields for models

November 20, 2020

models.BooleanField

You can use the following data fields when you create Django model

FieldDescription
models.BooleanFieldBoolean true or false
models.CharFieldYou can represent a character
models.DateFieldTo work with date in Django
models.DateTimeField
models.DecimalField
models.DurationField
models.EmailField
models.FileField
models.FilePathField
models.ImageField
models.IntegerField -1 0 1 2 3
models.IPAddressField192.168.2.1
models.NullBooleanField
models.PositiveIntegerField
models.PositiveSmallIntegerField
models.SlugField
models.SmallAutoField
models.SmallIntegerField
models.TimeField
models.TextChoices
models.TextField
models.URLField
models.UUIDField