Answer the question
In order to leave comments, you need to log in
Is it possible to create a User instance specifying only pk?
there is a model
class Test(models.Model):
user = models.OneToOneField(User)
text = models.TextField()
Test(user=1, text='123')
Test(user__pk=1, text='123')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question