Make sure unique ids are unique by outputting the time slot ids rather

than "session + number of session in this meeting"
 - Legacy-Id: 3994
This commit is contained in:
Ole Laursen 2012-02-28 14:38:01 +00:00
parent 4b41139491
commit 65d3b28707
3 changed files with 5 additions and 2 deletions

View file

@ -448,6 +448,9 @@ def csv_agenda(request, num=None):
rgs = IRTF.objects.all().order_by('acronym')
areas = Area.objects.filter(status=Area.ACTIVE).order_by('area_acronym__acronym')
# we should really use the Python csv module or something similar
# rather than a template file which is one big mess
return HttpResponse(render_to_string("meeting/agenda.csv",
{"timeslots":timeslots, "update":update, "meeting":meeting, "venue":venue, "ads":ads,
"plenaryw_agenda":plenaryw_agenda, "plenaryt_agenda":plenaryt_agenda, },

View file

@ -1,5 +1,5 @@
{% load humanize %}{% autoescape off %}{% load ietf_filters %}"Date","Start","End","Session","Room","Area","Acronym","Type","Description","Session ID","Agenda","Slides"
{% for slot in timeslots %}{% ifchanged %}{% if slot.reg_info %}"{{ slot.meeting_date|date:"Y-m-d" }}","{{ slot.registration.time_desc|slice:":4" }}","{{ slot.registration.time_desc|slice:"5:9" }}","Registration","{{ venue.reg_area_name }}","","","","{{ slot.registration.name }}","r{{slot.day_id}}","",""
{% endif %}{% endifchanged %}{% if slot.session_name %}{% if slot.break_info %}"{{ slot.meeting_date|date:"Y-m-d" }}","{{ slot.break_info.time_desc|slice:":4" }}","{{ slot.break_info.time_desc|slice:"5:9" }}","Break","{{ venue.break_area_name }}","","","","{{ slot.break_info.name }}","b{{slot.time_id}}","",""
{% endif %}{% endif %}{% for session in slot.sessions_by_area %}"{{ slot.meeting_date|date:"Y-m-d" }}","{{ slot.time_desc|slice:":4" }}","{{ slot.time_desc|slice:"5:9" }}","{{ slot.session_name }}","{{ session.info.room_id.room_name }}","{{ session.info.area|upper }}","{{ session.info.acronym }}","{{ session.info.group_type_str }}","{{ session.info.acronym_name }}","{{session.info.session_id}}-{{session.info.ordinality}}","{% if session.info.agenda_file %}http://datatracker.ietf.org/meeting/{{ session.info.agenda_file }}{% endif %}","{% if session.info.slides %}{% for slide in session.info.slides %}http://www.ietf.org/proceedings/{{ slide.file_loc }}{% if not forloop.last %}|{% endif %}{% endfor %}{% endif %}"
{% endif %}{% endif %}{% for session in slot.sessions_by_area %}"{{ slot.meeting_date|date:"Y-m-d" }}","{{ slot.time_desc|slice:":4" }}","{{ slot.time_desc|slice:"5:9" }}","{{ slot.session_name }}","{{ session.info.room_id.room_name }}","{{ session.info.area|upper }}","{{ session.info.acronym }}","{{ session.info.group_type_str }}","{{ session.info.acronym_name }}","{{session.info.pk}}","{% if session.info.agenda_file %}http://datatracker.ietf.org/meeting/{{ session.info.agenda_file }}{% endif %}","{% if session.info.slides %}{% for slide in session.info.slides %}http://www.ietf.org/proceedings/{{ slide.file_loc }}{% if not forloop.last %}|{% endif %}{% endfor %}{% endif %}"
{% endfor %}{% endfor %}{% endautoescape %}

Can't render this file because it contains an unexpected character in line 1 and column 63.

View file

@ -21,7 +21,7 @@ DTEND{% if meeting.time_zone %};TZID="{{meeting.time_zone}}"{%endif%}:{{ slot.me
DTSTAMP:{{ now|date:"Ymd" }}T{{ now|date:"His" }}Z
END:VEVENT
{% endif %}{% endifchanged %}{% for session in slot.sessions %}{%for f in filter%}{%ifequal f session.acronym%}BEGIN:VEVENT
UID:ietf-{{meeting.num}}-{{session.acronym}}-{{session.ordinality}}
UID:ietf-{{meeting.num}}-{{session.acronym}}-{{session.pk}}
SUMMARY:{% if session.area %}{% ifnotequal session.area "1plenary" %}{{session.acronym|upper}} - {% endifnotequal %}{% endif %}{{session.acronym_name}}
LOCATION:{{session.room_id.room_name}}
STATUS:TENTATIVE