Problem with response values with join in django query?
i have this models.
class Product(models.Model):
id = models.IntegerField(primary_key=True)
name = models.CharField(max_length=50)
PublicationDate = models.DateField()
trend = models.IntegerField()
class User_list(models.Model):
product_id = ForeignKey(Product, on_delete=models.CASCADE)
userid = models.IntegerField()
i make a join query with select related
data = User_list.objects.select_related('product_id')
but the response don't get me Product fields value.
it's get me only User_list values, like this
"[{\"model\": \"app.user_list\", \"pk\": 1, \"fields\": {\"product_id\": 11916, \"userid\": 9}}]"
What's the problem?