Re: how to get at the manytomany fields in for

2013-11-24 Thread Daniel Roseman
No, that is incorrect. `dir_list` is a queryset of AdviceLevel objects, and `specialism` is a field defined directly on that model. You only need to add `_set` for a reverse relationship, which this isn't. -- DR. -- You received this message because you are subscribed to the Google Groups "Dj

Re: how to get at the manytomany fields in for

2013-11-22 Thread Arun K Reddy
Small correction to what Daniel suggested: {% for spec in d.specialism*_set*.all %} {{ spec.field1 }} etc {% endfor %} On Friday, November 22, 2013 4:23:42 PM UTC+5:30, MikeKJ wrote: > > Got this model > class AdviceLevel(models.Model): > advice = models.ForeignKey(Advice) >

Re: how to get at the manytomany fields in for

2013-11-22 Thread Daniel Roseman
On Friday, 22 November 2013 10:53:42 UTC, MikeKJ wrote: > > Got this model > class AdviceLevel(models.Model): > advice = models.ForeignKey(Advice) > organisation = models.ForeignKey(Organisation) > specialism = models.ManyToManyField(Specialism, null=True, blank=True) > service_rest