[Answer]-Can I set pk(primary key) as a dynamic number in django. If not then how do I set a variable to be dynamic?

1👍

No. And there’s no reason why you should do it, or why it should “create a problem” with your API. A PK uniquely identifies a record, and that identifier must stay the same: if anything, changing the PK for a record would be the thing that creates a problem. Don’t try.

Leave a comment