Re: How to Extract values of diffrent from foreign key in django models

2020-01-11 Thread Integr@te System
Hi Manas, What about User model!? (Because of ForeignKey you declared) This is where Friend.object.get() come from Friend model of current user. On Sun, Jan 12, 2020, 11:50 manas srivastava wrote: > > > > I have made a model to make friends using Django model. Now I am unable to > get the f

How to Extract values of diffrent from foreign key in django models

2020-01-11 Thread manas srivastava
I have made a model to make friends using Django model. Now I am unable to get the friend id through the model. The model is as follows class Friend(models.Model): users = models.ManyToManyField(User) #following users current_user = models.ForeignKey(User, related_name='owner', null