[Django]-What's the difference between Model.id and Model.pk in django?

48👍

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.

Leave a comment