Re: Displaying Related Data

2007-03-27 Thread Paul G. Barnes
That did the trick! Thanks! On 3/26/07 5:11 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > You are so close! this is a very common question. > > you want something like: > {% for school_emp in School.schoolpersonel_set.all %} > > But passing in the Model class 'School' is considered

Re: Displaying Related Data

2007-03-26 Thread [EMAIL PROTECTED]
You are so close! this is a very common question. you want something like: {% for school_emp in School.schoolpersonel_set.all %} But passing in the Model class 'School' is considered bad form. In your view, add the result of all() to your context: extra_context['personel'] = School.schoolperson

Displaying Related Data

2007-03-26 Thread Paul G. Barnes
OK, I'm a Python/Django newbie (more or less), and I have a problem. I had these two models (details stripped for clarity: class School(models.Model): ... name = models.CharField() street = models.CharField() mail = models.CharField() city = models.CharField() state = mod