django auto increment field

56

django auto increment field -

class ModelName(models.Model):
    auto_increment_id = models.AutoField(primary_key=True)
    # primary_key = True if you do not want to use default field "id" given by django to your model

Comments

Submit
0 Comments