Hello everybody, is it possible to filter data inside template? I have 2 models with a foreignkey relationship:
class Requests(models.Model): name = models.CharField(max_length=16) surname = models.CharField(max_length=16) class Information(models.Model): request = models.ForeignKey(Requests) description = models.CharField(max_length=16) >From the view to the template I pass a dictionary of requests and one of information. What I need to do is something like this: <table border='1'> {% for r in requests %} <tr> {% for i in informations WHERE request=r %} <td>{{i.description}}</td> {% endfor %} </tr> {% endfor %} </table> Any idea? Thx -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.