One research project can have many publications. One model includes the research projects, one model includes the publications and a third model assigns multiple publications to each research project. The model: class Researchproject(models.Model): restitle = models.TextField()
class Publication(models.Model): pubtitle = models.TextField() class Researchpublications(models.Model): researchproject = models.ForeignKey(Researchproject) publication = models.ForeignKey(Publication) In the view.py the research projects are selected and appended into a list called: research_list In the view I created this statement: respublications=Researchproject.objects.filter (researchpublications__researchproject=research_list), which doesn't get any errors, but also doesn't seem to do what I need it to do. In the template a research project should show all the publications associated with it. The template: {{ respublications }} gives this [] as the result. I need to grab the publication.id. Any help is appreciated. Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---