Added more information about session presentations to the agenda.json output, on request from pusateri@bangj.com.
- Legacy-Id: 13397
This commit is contained in:
parent
04e76c9fc9
commit
a559557284
|
@ -968,9 +968,24 @@ def json_agenda(request, num=None ):
|
|||
if asgn.session.minutes():
|
||||
sessdict['minutes'] = asgn.session.minutes().href()
|
||||
if asgn.session.slides():
|
||||
# Deprecated 19 May 2017, remove after ietf 100;
|
||||
sessdict['slides'] = []
|
||||
for slides in asgn.session.slides():
|
||||
sessdict['slides'].append('/api/v1/doc/document/%s/'%slides.name)
|
||||
# New alternative
|
||||
sessdict['presentations'] = []
|
||||
presentations = SessionPresentation.objects.filter(session=asgn.session, document__type__slug='slides')
|
||||
for pres in presentations:
|
||||
sessdict['presentations'].append(
|
||||
{
|
||||
'name': pres.document.name,
|
||||
'title': pres.document.title,
|
||||
'order': pres.order,
|
||||
'rev': pres.rev,
|
||||
'resource_uri': '/api/v1/meeting/sessionpresentation/%s/'%pres.id,
|
||||
})
|
||||
sessdict['session_res_uri'] = '/api/v1/meeting/session/%s/'%asgn.session.id
|
||||
sessdict['session_id'] = asgn.session.id
|
||||
modified = asgn.session.modified
|
||||
for doc in asgn.session.materials.all():
|
||||
rev_docevent = doc.latest_event(NewRevisionDocEvent,'new_revision')
|
||||
|
|
Loading…
Reference in a new issue