Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #auto #increment #field
ADD COMMENT
Topic
Name
3+5 =