From 80a7eb68fc7029104079c9ec4d85468c82d6f8d2 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 14 Dec 2011 02:16:58 +0530 Subject: [PATCH] captions for image gallery in meetings --- itf/festival/models.py | 8 ++++---- itf/templates/modules/festival/meeting.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/itf/festival/models.py b/itf/festival/models.py index 27a8286..8f9df81 100755 --- a/itf/festival/models.py +++ b/itf/festival/models.py @@ -58,9 +58,9 @@ class Meeting(ItfModel): meeting_data['meeting'] = self meeting_id = self.id # meeting_data['sessions'] = Session.objects.filter(day__meeting__id=meeting_id) # get meetings session objs - meeting_data['talks'] = Talk.objects.filter(session__day__meeting__id=meeting_id) - meeting_data['images'] = Image.objects.filter(meeting__id=meeting_id) - meeting_data['sessions'] = Session.objects.filter(day__meeting__id=meeting_id).order_by("day").order_by("session_no") + meeting_data['talks'] = Talk.objects.filter(session__day__meeting=self) + meeting_data['images'] = Image.objects.filter(meeting=self) + meeting_data['sessions'] = Session.objects.filter(day__meeting=self).order_by("day").order_by("session_no") meeting_data['documents'] = Document.objects.filter(meeting__id=meeting_id).exclude(talk__isnull=False) for s in meeting_data['sessions']: @@ -71,7 +71,7 @@ class Meeting(ItfModel): t.audio = Audio.objects.filter(talk__id=t.id) t.video = Video.objects.filter(talk__id=t.id) - meeting_data['imagegallery'] = Image.objects.filter(meeting__id=meeting_id) + meeting_data['imagegallery'] = Image.objects.filter(meeting=self) # meeting_data['participants'] = Participant.objects.filter(meeting__id=meeting_id).order_by('name') meeting_data['participants'] = self.participants.all() return meeting_data diff --git a/itf/templates/modules/festival/meeting.html b/itf/templates/modules/festival/meeting.html index ea28a84..f4f83b2 100755 --- a/itf/templates/modules/festival/meeting.html +++ b/itf/templates/modules/festival/meeting.html @@ -111,7 +111,7 @@ {% for i in imagegallery %} {% thumbnail i.file "600x500" crop="center" as big %} {% thumbnail i.file "164x114" crop="center" as thumb %} - +