You can’t. You can change what field is the primary key, but you can’t remove the primary key. Just specify primary_key=True on the field you would like to make your primary key.
From the docs:
Each model requires exactly one field to have primary_key=True (either explicitly declared or automatically added).
https://docs.djangoproject.com/en/1.11/topics/db/models/#automatic-primary-key-fields
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/c11a9e2d-b1e2-4e2f-9e6c-b6c74589efe0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.