I\'ve a model
from django.contrib.auth.models import User class ModelA(models.Model): phone = models.CharField(max_length=20) user = models.ForeignK
As can be seen in my historic comments, the accepted answer is not really correct. So as @yekta requested I re-submit my comments:
To create the parent model, use integer value like:
ModelA.objects.create(phone=data['phone'], user_id=1)