What's the difference between Model.id and Model.pk in django? What's the difference between Model.id and Model.pk in django? python python

What's the difference between Model.id and Model.pk in django?


pk is the attribute that contains the value of the primary key for the model. id is the name of the field created as a primary key by default if none is explicitly specified.