New code from Pasi for a machine-readadable page giving the documents on the next iesg agenda.

- Legacy-Id: 1389
This commit is contained in:
Henrik Levkowetz 2009-03-21 21:37:55 +00:00
parent b208e04ec2
commit 2df788a023
3 changed files with 46 additions and 2 deletions

View file

@ -65,6 +65,7 @@ urlpatterns += patterns('django.views.generic.list_detail',
urlpatterns += patterns('',
(r'^agenda/$', views.telechat_agenda),
(r'^agenda/documents.txt$', views.telechat_agenda_documents),
(r'^ann/ind/$',views.inddocs),
(r'^ann/(?P<cat>[^/]+)/$',views.wgdocs),
)

View file

@ -36,8 +36,8 @@
#from django.views.generic.date_based import archive_index
from ietf.idtracker.models import IDInternal, InternetDraft,AreaGroup,IETFWG
from django.views.generic.list_detail import object_list
from django.http import Http404
from django.template import RequestContext
from django.http import Http404, HttpResponse
from django.template import RequestContext, Context, loader
from django.shortcuts import render_to_response
from ietf.iesg.models import TelechatDates, TelechatAgendaItem, WGAction
import datetime
@ -160,3 +160,12 @@ def telechat_agenda(request, date=None):
private = 'private' in request.REQUEST
return render_to_response('iesg/agenda.html', {'date':str(date), 'docs':docs,'mgmt':mgmt,'wgs':wgs, 'private':private}, context_instance=RequestContext(request) )
def telechat_agenda_documents(request):
dates = TelechatDates.objects.all()[0].dates()
docs = []
for date in dates:
docs.extend(IDInternal.objects.filter(telechat_date=date, primary_flag=1, agenda=1))
t = loader.get_template('iesg/agenda_documents.txt')
c = Context({'docs':docs})
return HttpResponse(t.render(c), mimetype='text/plain')

View file

@ -0,0 +1,34 @@
{% comment %}
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the Nokia Corporation and/or its
subsidiary(-ies) nor the names of its contributors may be used
to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
{% endcomment %}# Fields: telechat date, filename (draft-foo-bar or rfc1234), intended status, rfc editor submission flag (0=no, 1=yes), area acronym, AD name{% for doc in docs %}
{{ doc.telechat_date }} {{ doc.document.filename }} {{ doc.document.intended_status }} {{doc.via_rfc_editor}} {{doc.area_acronym|lower}} {{doc.token_name }}{% endfor %}