Re: Categorize and List if Item Exists

2008-04-23 Thread andy baxter
andy baxter wrote: > you want a tag that would let you write an include file like: > > {% for category in categorybranch %} > sorry that should be {% for category in categorybranch.sub_cats %} > (print category name here) > {% include "self.html" with categorybranch=category %} > {% for product

Re: Categorize and List if Item Exists

2008-04-22 Thread andy baxter
Michael Ellis wrote: > Hello all, > > I have the following models: > > class Category(models.Model): > name = models.CharField(core=True, max_length=100) > parent = models.ForeignKey('self', blank=True, null=True, > related_name='child') > > class Product(models.Model): > name =

Categorize and List if Item Exists

2008-04-22 Thread Michael Ellis
Hello all, I have the following models: class Category(models.Model): name = models.CharField(core=True, max_length=100) parent = models.ForeignKey('self', blank=True, null=True, related_name='child') class Product(models.Model): name = models.CharField('name', max_lengt