Open razorman8669 opened 2 years ago
in the readme, in order to get the id field to be recognized, it's recommended to declare the AutoField explicitly like so:
id
# before class Post(models.Model): ... # after class Post(models.Model): id = models.AutoField(primary_key=True)
But why not just assign a type to the id field like so:
# after class Post(models.Model): id: int
the later avoids any unnecessary migrations from being created during makemigrations after modifying the models.
makemigrations
The README has been updated, this can probably be closed
in the readme, in order to get the
id
field to be recognized, it's recommended to declare the AutoField explicitly like so:But why not just assign a type to the
id
field like so:the later avoids any unnecessary migrations from being created during
makemigrations
after modifying the models.