Make primary key with two or more field in Django

Most of the time, people don't actually need their composite (multi-column) key to be the primary key. Django operates best with surrogate keys -  that is, it automatically defines an autoincrement field called id and sets that to be the primary key. That is suitable for almost all the users. If you then need to enforce … Continue reading Make primary key with two or more field in Django