Reputation: 533
How can I get the value of this queryset?
I'm trying to get the value of name but it only show object.
class Brand(models.Model):
name = models.CharField(max_length=255, blank=False)
class SubBrand(models.Model):
name = models.CharField(max_length=255, blank=False)
brand = models.ForeignKey(Brand)
>>> print Brand.objects.filter(subbrand__id='2')
<QuerySet [<Brand: Brand object>]>
Upvotes: 0
Views: 2383