1

I made this django model:

class Car(models.Model):
    car_id = models.AutoField(primary_key=True)
    engine_size = models.FloatField()
    fuel_consumption = models.FloatField()

    def __str__(self):
        return(str(self.car_id))

The automatic field generator in django always starts from 1. How do I make it generate id from initial value=100. For example, 100,101,102...

Is there any built-in tool, or I just need to create a custom function for this?

4

1 に答える 1