def list_tracks(request, slug): event = Event.get_by_slug(slug) tracks = event.tracks() return [{ 'name': track.name, 'schedule': track.get_talks(event) } for track in tracks]
def list_sponsors(request, slug): event = Event.get_by_slug(slug) sponsors = event.memberships.all().order_by('category__role__order') return [serializer_sponsor(sponsor) for sponsor in sponsors]
def list_speakers(request, slug): event = Event.get_by_slug(slug) speakers = event.speakers() return [serialize_speaker(event, speaker) for speaker in speakers]
def list_talks(request, slug): event = Event.get_by_slug(slug) talks = ( s for s in event.schedule.select_related('slot').order_by('slot__name') if s.slot.is_talk()) return [serialize_talk(talk) for talk in talks]
def detail_event(request, slug): """Details from event indicated, with URL pointing to more resources. """ event = Event.get_by_slug(slug) return serialize_event(event)