I've been trying to create a model that has a primary key, but I don't want that primary key to auto increment.
I know I can specify the value each time, but I want the field to be required that I specify it (hopefully enforced by the database and django), and fail fast if I forget.
It seemed logical that I would be able to say
id field with
primary_key=True explicitly in your model:
class SomeModel(models.Model): id = models.IntegerField(primary_key=True)
That way it won't be auto-incremented, but it will still be an primary key.