actually it worked even without the the set.all ,thanks for help
On Sat, May 19, 2012 at 4:51 AM, Kurtis Mullins wrote:
> Whoops -- that might need to be 'house.people_set.all'. Sorry.
>
>
> On Fri, May 18, 2012 at 10:50 PM, Kurtis Mullins > wrote:
>
>> Try something along these lines (Note: I'm
Whoops -- that might need to be 'house.people_set.all'. Sorry.
On Fri, May 18, 2012 at 10:50 PM, Kurtis Mullins
wrote:
> Try something along these lines (Note: I'm switching up your variable
> names a bit to make it easier to read)
>
> {% for house in houses %}
> {{ house.name }}
> {% for
Try something along these lines (Note: I'm switching up your variable names
a bit to make it easier to read)
{% for house in houses %}
{{ house.name }}
{% for person in house.people.all %}
{{ person.name }}
{% endfor %}
{% endfor %}
I just wrote that code block pretty quickly
it's not working with me
On Tuesday, June 30, 2009 10:43:15 AM UTC+2, russelson wrote:
>
> Hi,
>
> I'm new to django
>
> I have two models
>
> #models.py
>
> class House(models.Model):
> name = models.CharField(blank=True, max_length=50)
>
> class People(models.Model):
> name = mode
On Tuesday 30 June 2009 14:13:15 russelson wrote:
> #models.py
>
> class House(models.Model):
> name = models.CharField(blank=True, max_length=50)
>
> class People(models.Model):
> name = models.CharField(blank=True, max_length=50)
> house = models.ForegnKey(House)
>
> #views.py
> def
Hi,
I'm new to django
I have two models
#models.py
class House(models.Model):
name = models.CharField(blank=True, max_length=50)
class People(models.Model):
name = models.CharField(blank=True, max_length=50)
house = models.ForegnKey(House)
#views.py
def house_list(request):
6 matches
Mail list logo