DJANGO:How to perform AND operation for my query?
0
There are two models .I want to make query to extract only the app exact app related Adspaces . models.py class Appname(models.Model): user=models.ForeignKey(User,related_name='appname', null=True, default=None,on_delete=models.CASCADE) name=models.CharField(max_length=150,blank=False,null=False,help_text='Add your new App') def __str__(self): return self.name def get_absolute_url(self): return reverse("dashapp:space",kwargs={'pk':self.pk}) class Adspace(models.Model): user=models.ForeignKey(User,related_name='adspace', null=True, default=None,on_delete=models.CASCADE) ad_space=models.CharField(max_length=150,blank=False,null=False) app=models.ForeignKey('Appname', related_name='appnames...