On 29-Mar-08, at 11:17 AM, Brandon Taylor wrote:
> What I would like to accomplish is output that looks as such: > > <h3>Category name</h3> > <ul> > <li>Sample Name</li> > <li>Sample Name</li> > <li>Sample Name</li> > </ul> > > <h3>Category name</h3> > <ul> > <li>Sample Name</li> > <li>Sample Name</li> > <li>Sample Name</li> > </ul> > wc = WorkCategory.objects.all() for w in wc: for sample in wc.workcategory_set.all(): print sample or in html: {% for w in wc %} <ul> {% for sample in w.workcategory_set.all %} <li>sample</li> {% endfor %} </ul> {% endfor %} -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---