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
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
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
3 matches
Mail list logo