1In Django
2
31 : we have default field with name "id" which is auto increment.
42 : You can define a auto increment field using AutoField field as below.
5
6EXAMPLE:
7class Order(models.Model):
8 auto_increment_id = models.AutoField(primary_key=True)
9 #you use primary_key = True if you do not want to use default field "id" given by django to your model