Hi all,
I'm using django for a couple of years, and I've a question about relations in the ORM and templates. I massively use class-based generic views.
I' currently working with a model which have many other models FKing to it :
class People(models.Model):
last_name = models.CharField(max_length=255)
... other fields ...
class PhoneNumber(models.Model):
people = models.ForeignKey("my_app.People")
number = models.CharField(max_length=255)
... other fields ...
According to documentation, it is possible to use a `People.phonenumber_set` attribute from a people instance, queryset'ing related phone numbers from people.
in may template "myapp/people_detail.html", when I query this attribute from my template, by using {% for phonenumber in object.phonenumber_set.all %}[% endfor %}, I do not any phone number...
When I step -to-step debug the application, I can see a "myapp_phonenumber_related" related manager, but no phonenumber_set.
Do I miss something ?
Thanks for your great job...