get_dict for events

This commit is contained in:
Johnson Chetty 2013-04-12 21:37:45 +02:00
parent 00869b876e
commit 6aaa192382

View File

@ -84,10 +84,17 @@ class Event(ItfModel):
'buzzitems': [ obj for obj in self.buzzitems.all()],
'groups': [obj for obj in self.groupevent_set.all()],
'galleries': [obj for obj in self.galleries.all()],
'child_events': self.child_events.all(),
'parent':self.parent_event,
}
if self.parent_event:
rdict['parent'] = self.parent_event
if self.groups.all():
groups= {
'venue': [ obj.group for obj in self.groupevent_set.filter(typ='venue')],
'performing': [ obj.group for obj in self.groupevent_set.filter(typ='performing')]
}
rdict['groups']= groups
if self.people.all():
people= {
'attendees': [ obj.person for obj in self.personevent_set.filter(typ='attendee')],