Re: Problem displaying value(s) from ManyToMany relationship

2008-05-19 Thread phillc
variable name collision. caused by locals() On May 18, 8:05 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote: > Very odd. On a whim, I changed: > > > {% for instructor in instructors %} > {{ instructor.first_name }} #there is no value output > here > {% endif %} > > > to > > > {% for i in

Re: Problem displaying value(s) from ManyToMany relationship

2008-05-18 Thread Brandon Taylor
Very odd. On a whim, I changed: {% for instructor in instructors %} {{ instructor.first_name }} #there is no value output here {% endif %} to {% for i in instructors %} {{ i.first_name }} #this works?! here {% endif %} Can anyone offer some reason why that would work? Just for my

Re: Problem displaying value(s) from ManyToMany relationship

2008-05-18 Thread Brandon Taylor
Here is my code: #in models.py class Instructor(models.Model): prefix = models.CharField(max_length=50, blank=True, null=True) first_name = models.CharField(max_length=50) middle_name = models.CharField(max_length=50, blank=True, null=True) last_name =

Problem displaying value(s) from ManyToMany relationship

2008-05-18 Thread Brandon Taylor
Hi everyone, I have a ManyToMany field on a model, and when I want to get the related items and display them in a template in a for loop, the loop executes the correct number of times, but in my output blocks there are no values. If I print the object, I get an array of values, same as any