I have 3 models connected in this way:
class book(models.Model):
id = models.AutoField(primary_key=True)
publisher= models.ForeignKey(Publisher, related_name='publisher')
class reader(models.Model):
publisher= models.ForeignKey(Publisher)
class publisher(models.Model):
date = models.DateTimeField()
and i'm trying to get all the reader of specific book.
I tried to do: Reader.objects.select_related(publisher__id='some_id')
ang got err: Unable to get repr for <class 'django.db.models.query.QuerySet'>
I cant change this model, there is way I can get this information with that models?
thanks.