you using primary_key in one OnetoOneField, please create other Field id =
AutoField(primary_key=True)
ex:
class AgentOrderRejection(models.Model):
id_agent = models.AutoField(primary_key=True)
agent = models.ForeignKey(AgentProfile)
user = models.OneToOneField(USER_MODEL)
or use this:
http://stackoverflow.com/questions/26188997/django-model-onetoonefield-without-creating-additional-id-database-column
sorry for my bad english
Att;
Adailton do nascimento
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/5c8ac0ed-299e-4311-868f-f4aaa863a38e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.