From 143dbbce2891be043c6acbcd794f09ed03eadbc4 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Wed, 29 Aug 2012 19:53:15 -0600 Subject: [PATCH 01/46] added schedule models (not fully complete) --- symposion/schedule/__init__.py | 0 symposion/schedule/models.py | 59 ++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 symposion/schedule/__init__.py create mode 100644 symposion/schedule/models.py diff --git a/symposion/schedule/__init__.py b/symposion/schedule/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/symposion/schedule/models.py b/symposion/schedule/models.py new file mode 100644 index 00000000..b51c7814 --- /dev/null +++ b/symposion/schedule/models.py @@ -0,0 +1,59 @@ +from django.db import models + +from symposion.conference.models import Section + + +class Schedule(models.Model): + + section = models.OneToOneField(Section) + + +class Day(models.Model): + + date = models.DateField() + + +class Track(models.Model): + + name = models.CharField(max_length=65) + room = models.CharField(max_length=100) + + +class Slot(models.Model): + + day = models.ForeignKey(Day) + track_set = models.TextField(db_column="tracks") + start = models.TimeField() + end = models.TimeField() + + @property + def tracks(self): + attr = "_tracks" + if not hasattr(self, attr): + slot = self + class TrackSet(object): + + def __init__(self, data, delimiter): + self.data = set(data.split(delimiter)) + + def __iter__(self): + return Track.objects.filter(pk__in=self.data) + + def add(self, track, commit=True): + """ + Add given track to the set, but check if it can exist + before adding it. + """ + self.data.add(track.pk) + self._update_model(commit=commit) + + def remove(self, track, commit=True): + self.data.remove(track.pk) + self._update_model(commit=commit) + + def _update_model(self, commit=True): + slot.track_set += self.delimiter.join(self.data) + if commit: + slot.save(force_update=True) + setattr(self, attr, TrackSet(self.track_set, delimiter=" ")) + return getattr(self, attr) From 77dc781e0d8b742956678bd5dd6577d23cd7753c Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Wed, 29 Aug 2012 23:58:03 -0600 Subject: [PATCH 02/46] Improved schedule models and behavior This allows for full slot creation now. --- symposion/schedule/models.py | 58 ++++++++++++++++-------------------- symposion/schedule/utils.py | 34 +++++++++++++++++++++ 2 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 symposion/schedule/utils.py diff --git a/symposion/schedule/models.py b/symposion/schedule/models.py index b51c7814..2e885bd9 100644 --- a/symposion/schedule/models.py +++ b/symposion/schedule/models.py @@ -1,6 +1,7 @@ from django.db import models from symposion.conference.models import Section +from symposion.schedule.utils import InlineSet class Schedule(models.Model): @@ -10,50 +11,41 @@ class Schedule(models.Model): class Day(models.Model): + schedule = models.ForeignKey(Schedule) date = models.DateField() - - -class Track(models.Model): + class Meta: + unique_together = [("schedule", "date")] + + +class Room(models.Model): + + schedule = models.ForeignKey(Schedule) name = models.CharField(max_length=65) - room = models.CharField(max_length=100) + order = models.PositiveIntegerField() + + +class SlotKind(models.Model): + """ + A slot kind represents what kind a slot is. For example, a slot can be a + break, lunch, or X-minute talk. + """ + + schedule = models.ForeignKey(Schedule) + label = models.CharField(max_length=50) class Slot(models.Model): day = models.ForeignKey(Day) - track_set = models.TextField(db_column="tracks") + room_set = models.TextField(db_column="rooms") + kind = models.ForeignKey(SlotKind) start = models.TimeField() end = models.TimeField() @property - def tracks(self): - attr = "_tracks" + def rooms(self): + attr = "_rooms" if not hasattr(self, attr): - slot = self - class TrackSet(object): - - def __init__(self, data, delimiter): - self.data = set(data.split(delimiter)) - - def __iter__(self): - return Track.objects.filter(pk__in=self.data) - - def add(self, track, commit=True): - """ - Add given track to the set, but check if it can exist - before adding it. - """ - self.data.add(track.pk) - self._update_model(commit=commit) - - def remove(self, track, commit=True): - self.data.remove(track.pk) - self._update_model(commit=commit) - - def _update_model(self, commit=True): - slot.track_set += self.delimiter.join(self.data) - if commit: - slot.save(force_update=True) - setattr(self, attr, TrackSet(self.track_set, delimiter=" ")) + setattr(self, attr, InlineSet(obj=self, field="room_set", delimiter=" ")) return getattr(self, attr) diff --git a/symposion/schedule/utils.py b/symposion/schedule/utils.py new file mode 100644 index 00000000..341d44d7 --- /dev/null +++ b/symposion/schedule/utils.py @@ -0,0 +1,34 @@ +class InlineSet(object): + + def __init__(self, obj, field, delimiter): + self.obj = obj + self.field = field + self.data = set([x for x in getattr(obj, field).split(delimiter) if x]) + self.delimiter = delimiter + + def __iter__(self): + return iter(self.queryset()) + + def __len__(self): + return self.queryset().count() + + def queryset(self): + return self.obj.__class__._default_manager.filter(pk__in=self.data) + + def add(self, obj, commit=True): + """ + Add given room to the set, but check if it can exist + before adding it. + """ + self.data.add(obj.pk) + self._update_model(commit=commit) + + def remove(self, obj, commit=True): + self.data.remove(obj.pk) + self._update_model(commit=commit) + + def _update_model(self, commit=True): + value = self.delimiter.join([str(x) for x in self.data]) + setattr(self.obj, self.field, value) + if commit: + self.obj.save(force_update=True) \ No newline at end of file From 0a4e626dfe9b5887291259849368dabf6c7d4043 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Thu, 30 Aug 2012 00:21:48 -0600 Subject: [PATCH 03/46] Started detail and edit views with slug field to Schedule --- symposion/schedule/models.py | 1 + symposion/schedule/urls.py | 9 +++++++++ symposion/schedule/views.py | 31 +++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 symposion/schedule/urls.py create mode 100644 symposion/schedule/views.py diff --git a/symposion/schedule/models.py b/symposion/schedule/models.py index 2e885bd9..151ecab2 100644 --- a/symposion/schedule/models.py +++ b/symposion/schedule/models.py @@ -7,6 +7,7 @@ from symposion.schedule.utils import InlineSet class Schedule(models.Model): section = models.OneToOneField(Section) + slug = models.SlugField(unique=True) class Day(models.Model): diff --git a/symposion/schedule/urls.py b/symposion/schedule/urls.py new file mode 100644 index 00000000..8b0450b0 --- /dev/null +++ b/symposion/schedule/urls.py @@ -0,0 +1,9 @@ +from django.conf.urls.defaults import url, patterns + + +urlpatterns = patterns("symposion.schedule.views", + url(r"^$", "schedule_detail", name="schedule_detail_singleton"), + url(r"^edit/$", "schedule_edit", name="schedule_edit_singleton"), + url(r"^(\w+)/edit/$", "schedule_detail", name="schedule_detail"), + url(r"^(\w+)/edit/$", "schedule_edit", name="schedule_edit"), +) diff --git a/symposion/schedule/views.py b/symposion/schedule/views.py new file mode 100644 index 00000000..248db247 --- /dev/null +++ b/symposion/schedule/views.py @@ -0,0 +1,31 @@ +from django.shortcuts import render, get_object_or_404 + +from symposion.schedule.models import Schedule + + +def schedule_detail(request, slug=None): + qs = Schedule.objects.all() + if pk is None: + schedule = next(iter(qs), None) + if schedule is None: + raise Http404() + else: + schedule = get_object_or_404(qs, slug=slug) + ctx = { + "schedule": schedule, + } + return render(request, "schedule/schedule_detail.html") + + +def schedule_edit(request, slug=None): + qs = Schedule.objects.all() + if pk is None: + schedule = next(iter(qs), None) + if schedule is None: + raise Http404() + else: + schedule = get_object_or_404(qs, slug=slug) + ctx = { + "schedule": schedule, + } + return render(request, "schedule/schedule_edit.html") From bec6903ca1c9570a014e7676fceaf0b081eec637 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Thu, 30 Aug 2012 00:23:49 -0600 Subject: [PATCH 04/46] Fixed slug bug --- symposion/schedule/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symposion/schedule/views.py b/symposion/schedule/views.py index 248db247..a22ae976 100644 --- a/symposion/schedule/views.py +++ b/symposion/schedule/views.py @@ -5,7 +5,7 @@ from symposion.schedule.models import Schedule def schedule_detail(request, slug=None): qs = Schedule.objects.all() - if pk is None: + if slug is None: schedule = next(iter(qs), None) if schedule is None: raise Http404() @@ -19,7 +19,7 @@ def schedule_detail(request, slug=None): def schedule_edit(request, slug=None): qs = Schedule.objects.all() - if pk is None: + if slug is None: schedule = next(iter(qs), None) if schedule is None: raise Http404() From f3e9cc9a5db391e2d45a15ebd85d2463794671cb Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Thu, 30 Aug 2012 00:51:07 -0600 Subject: [PATCH 05/46] Added TimeTable --- symposion/schedule/models.py | 6 +++++- symposion/schedule/timetable.py | 37 +++++++++++++++++++++++++++++++++ symposion/schedule/views.py | 3 +++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 symposion/schedule/timetable.py diff --git a/symposion/schedule/models.py b/symposion/schedule/models.py index 151ecab2..962027fd 100644 --- a/symposion/schedule/models.py +++ b/symposion/schedule/models.py @@ -48,5 +48,9 @@ class Slot(models.Model): def rooms(self): attr = "_rooms" if not hasattr(self, attr): - setattr(self, attr, InlineSet(obj=self, field="room_set", delimiter=" ")) + class RoomInlineSet(InlineSet): + def consective_count(self): + return len(self) + value = RoomInlineSet(obj=self, field="room_set", delimiter=" ") + setattr(self, attr, value) return getattr(self, attr) diff --git a/symposion/schedule/timetable.py b/symposion/schedule/timetable.py new file mode 100644 index 00000000..8c9f072e --- /dev/null +++ b/symposion/schedule/timetable.py @@ -0,0 +1,37 @@ +import itertools + + +class Timetable(object): + + def __init__(self, day): + self.day = day + + def slots_qs(self): + return Slot.objects.filter(day=self.day) + + def rooms(self): + return Room.objects.filter(day=self.day.schedule) + + def __iter__(self): + times = sorted(set(itertools.chain(*self.slots_qs().values_list("start", "end")))) + slots = list(self.slots_qs().order_by("start")) + row = [] + for time, next_time in pairwise(times): + row = {"time": time, "slots": []} + for slot in slots: + if slot.start == time: + slot.rowspan = Timetable.rowspan(times, slot.start, slot.end) + row["slots"].append(slot) + row["colspan"] = self.rooms.consecutive_count() + if row["slots"] or next_time is None: + yield row + + @staticmethod + def rowspan(times, start, end): + return times.index(end) - times.index(start) + + +def pairwise(iterable): + a, b = itertools.tee(iterable) + b.next() + return itertools.izip_longest(a, b) diff --git a/symposion/schedule/views.py b/symposion/schedule/views.py index a22ae976..4e968d3f 100644 --- a/symposion/schedule/views.py +++ b/symposion/schedule/views.py @@ -25,7 +25,10 @@ def schedule_edit(request, slug=None): raise Http404() else: schedule = get_object_or_404(qs, slug=slug) + days_qs = Day.objects.filter(schedule=schedule) + days = [TimeTable(day) for day in days_qs] ctx = { "schedule": schedule, + "days": days, } return render(request, "schedule/schedule_edit.html") From 7601791e8cd008790b94767fff46f7ca1b26459e Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Thu, 30 Aug 2012 00:52:50 -0600 Subject: [PATCH 06/46] Fixed tons of little bugs --- symposion/schedule/timetable.py | 2 ++ symposion/schedule/views.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/symposion/schedule/timetable.py b/symposion/schedule/timetable.py index 8c9f072e..bd6354ac 100644 --- a/symposion/schedule/timetable.py +++ b/symposion/schedule/timetable.py @@ -1,5 +1,7 @@ import itertools +from symposion.schedule.models import Room, Slot + class Timetable(object): diff --git a/symposion/schedule/views.py b/symposion/schedule/views.py index 4e968d3f..d9cd2fa6 100644 --- a/symposion/schedule/views.py +++ b/symposion/schedule/views.py @@ -1,6 +1,8 @@ +from django.http import Http404 from django.shortcuts import render, get_object_or_404 -from symposion.schedule.models import Schedule +from symposion.schedule.models import Schedule, Day +from symposion.schedule.timetable import TimeTable def schedule_detail(request, slug=None): @@ -14,7 +16,7 @@ def schedule_detail(request, slug=None): ctx = { "schedule": schedule, } - return render(request, "schedule/schedule_detail.html") + return render(request, "schedule/schedule_detail.html", ctx) def schedule_edit(request, slug=None): @@ -31,4 +33,4 @@ def schedule_edit(request, slug=None): "schedule": schedule, "days": days, } - return render(request, "schedule/schedule_edit.html") + return render(request, "schedule/schedule_edit.html", ctx) From 14f43da962a838b03224d05e9d8f7b121cd9802a Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Thu, 30 Aug 2012 00:53:31 -0600 Subject: [PATCH 07/46] Corrected naming --- symposion/schedule/timetable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/symposion/schedule/timetable.py b/symposion/schedule/timetable.py index bd6354ac..5f3946fb 100644 --- a/symposion/schedule/timetable.py +++ b/symposion/schedule/timetable.py @@ -3,7 +3,7 @@ import itertools from symposion.schedule.models import Room, Slot -class Timetable(object): +class TimeTable(object): def __init__(self, day): self.day = day @@ -22,7 +22,7 @@ class Timetable(object): row = {"time": time, "slots": []} for slot in slots: if slot.start == time: - slot.rowspan = Timetable.rowspan(times, slot.start, slot.end) + slot.rowspan = TimeTable.rowspan(times, slot.start, slot.end) row["slots"].append(slot) row["colspan"] = self.rooms.consecutive_count() if row["slots"] or next_time is None: From 69097d86c9064887f27d3502cf9bcda1f9953213 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Thu, 30 Aug 2012 00:57:02 -0600 Subject: [PATCH 08/46] Fixed rooms queryset to be ordered --- symposion/schedule/timetable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symposion/schedule/timetable.py b/symposion/schedule/timetable.py index 5f3946fb..adcaf5ad 100644 --- a/symposion/schedule/timetable.py +++ b/symposion/schedule/timetable.py @@ -12,7 +12,7 @@ class TimeTable(object): return Slot.objects.filter(day=self.day) def rooms(self): - return Room.objects.filter(day=self.day.schedule) + return Room.objects.filter(day=self.day.schedule).order_by("order") def __iter__(self): times = sorted(set(itertools.chain(*self.slots_qs().values_list("start", "end")))) From d7b3696c6e07ccd94995e4eea10c02d6848a0ab7 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Thu, 30 Aug 2012 00:58:16 -0600 Subject: [PATCH 09/46] Fixed room lookup bug --- symposion/schedule/timetable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symposion/schedule/timetable.py b/symposion/schedule/timetable.py index adcaf5ad..0f3767e5 100644 --- a/symposion/schedule/timetable.py +++ b/symposion/schedule/timetable.py @@ -12,7 +12,7 @@ class TimeTable(object): return Slot.objects.filter(day=self.day) def rooms(self): - return Room.objects.filter(day=self.day.schedule).order_by("order") + return Room.objects.filter(schedule=self.day.schedule).order_by("order") def __iter__(self): times = sorted(set(itertools.chain(*self.slots_qs().values_list("start", "end")))) From 44d0ea6f2b8ea6535cd9c41e68222696222e94d1 Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Thu, 30 Aug 2012 01:02:49 -0600 Subject: [PATCH 10/46] Moved colspan to slot in TimeTable --- symposion/schedule/timetable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symposion/schedule/timetable.py b/symposion/schedule/timetable.py index 0f3767e5..87ffeacf 100644 --- a/symposion/schedule/timetable.py +++ b/symposion/schedule/timetable.py @@ -23,8 +23,8 @@ class TimeTable(object): for slot in slots: if slot.start == time: slot.rowspan = TimeTable.rowspan(times, slot.start, slot.end) + slot.colspan = slot.rooms.consecutive_count() row["slots"].append(slot) - row["colspan"] = self.rooms.consecutive_count() if row["slots"] or next_time is None: yield row From 3ade1c5516ad828f6d23e14d9c228ce99da7d28e Mon Sep 17 00:00:00 2001 From: Brian Rosner Date: Thu, 30 Aug 2012 01:04:08 -0600 Subject: [PATCH 11/46] Fixed typo in method name --- symposion/schedule/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symposion/schedule/models.py b/symposion/schedule/models.py index 962027fd..fa1c9ba9 100644 --- a/symposion/schedule/models.py +++ b/symposion/schedule/models.py @@ -49,7 +49,7 @@ class Slot(models.Model): attr = "_rooms" if not hasattr(self, attr): class RoomInlineSet(InlineSet): - def consective_count(self): + def consecutive_count(self): return len(self) value = RoomInlineSet(obj=self, field="room_set", delimiter=" ") setattr(self, attr, value) From 746e34cf3c4094649f399bdfad9a6c5eda211f34 Mon Sep 17 00:00:00 2001 From: James Tauber Date: Thu, 30 Aug 2012 03:14:46 -0400 Subject: [PATCH 12/46] work in progress on schedule edit template --- symposion/templates/schedule/_grid.html | 38 +++++++ .../templates/schedule/schedule_edit.html | 100 ++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 symposion/templates/schedule/_grid.html create mode 100644 symposion/templates/schedule/schedule_edit.html diff --git a/symposion/templates/schedule/_grid.html b/symposion/templates/schedule/_grid.html new file mode 100644 index 00000000..722b0b7f --- /dev/null +++ b/symposion/templates/schedule/_grid.html @@ -0,0 +1,38 @@ + + + + {% for room in timetable.rooms %} + + {% endfor %} + + {% for row in timetable %} + + + {% for slot in row.slots %} + + {% comment %} + + {% endcomment %} + {% endfor %} + + {% endfor %} +
 {{ room.name }}
{{ row.time|date:"h:iA" }} + add: plenary | break | presentation + + {% if not slot.content %} + add: plenary | break | presentation/span> + {% else %} + {% if slot.kind.name == "recess" %} +
{{ slot.content.title }}
+ {% else %} + {% if slot.kind.name == "plenary" %} +
{{ slot.content.title }}
+
{{ slot.content.speaker }}
+ {% else %} +
{{ slot.content.title }}
+
{{ slot.content.speaker }}
+ {% endif %} + {% endif %} + actions: editremove + {% endif %} +
\ No newline at end of file diff --git a/symposion/templates/schedule/schedule_edit.html b/symposion/templates/schedule/schedule_edit.html new file mode 100644 index 00000000..cb0673d6 --- /dev/null +++ b/symposion/templates/schedule/schedule_edit.html @@ -0,0 +1,100 @@ +{% extends "site_base.html" %} + +{% block head_title %}Conference Schedule Edit{% endblock %} + +{% block body_class %}full{% endblock %} + +{% block right %} +{% endblock %} + +{% block extra_head %} + + +{% endblock %} + +{% block body %} +

Schedule Edit

+ + {% for timetable in days %} +

{{ timetable.day.date }}

+ + {% include "schedule/_grid.html" %} + {% endfor %} + +{% endblock %} From 95d182e5285487d4b2e331332ca42e2603e17751 Mon Sep 17 00:00:00 2001 From: James Tauber Date: Thu, 30 Aug 2012 12:17:10 -0400 Subject: [PATCH 13/46] use full span12 on schedule edit --- .../templates/schedule/schedule_edit.html | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/symposion/templates/schedule/schedule_edit.html b/symposion/templates/schedule/schedule_edit.html index cb0673d6..e5cd80f1 100644 --- a/symposion/templates/schedule/schedule_edit.html +++ b/symposion/templates/schedule/schedule_edit.html @@ -88,13 +88,16 @@ {% endblock %} -{% block body %} -

Schedule Edit

- - {% for timetable in days %} -

{{ timetable.day.date }}

+{% block body_outer %} +
+
+

Schedule Edit

- {% include "schedule/_grid.html" %} - {% endfor %} - + {% for timetable in days %} +

{{ timetable.day.date }}

+ + {% include "schedule/_grid.html" %} + {% endfor %} +
+
{% endblock %} From 38e2124c646e5086288dccfb02d4803672e61e32 Mon Sep 17 00:00:00 2001 From: James Tauber Date: Thu, 30 Aug 2012 12:26:41 -0400 Subject: [PATCH 14/46] work in progress improvements to schedule edit styling --- symposion/templates/schedule/_grid.html | 6 +- .../templates/schedule/schedule_edit.html | 68 +++++++------------ 2 files changed, 26 insertions(+), 48 deletions(-) diff --git a/symposion/templates/schedule/_grid.html b/symposion/templates/schedule/_grid.html index 722b0b7f..b4592343 100644 --- a/symposion/templates/schedule/_grid.html +++ b/symposion/templates/schedule/_grid.html @@ -1,4 +1,4 @@ - +
{% for room in timetable.rooms %} @@ -9,8 +9,8 @@ {% for slot in row.slots %} - {% comment %}
 
{{ row.time|date:"h:iA" }} - add: plenary | break | presentation + + add: plenary | break | presentation diff --git a/symposion/templates/schedule/schedule_edit.html b/symposion/templates/schedule/schedule_edit.html index e5cd80f1..75c5f799 100644 --- a/symposion/templates/schedule/schedule_edit.html +++ b/symposion/templates/schedule/schedule_edit.html @@ -10,29 +10,34 @@ {% block extra_head %} {% endblock %} From 13bc9ffacb95c78160c923c032fa6929f9f131db Mon Sep 17 00:00:00 2001 From: Luke Hatcher Date: Fri, 31 Aug 2012 01:50:00 -0400 Subject: [PATCH 40/46] add schedule list --- symposion/schedule/urls.py | 1 + symposion/schedule/views.py | 10 +++++++++- .../templates/schedule/schedule_list.html | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 symposion/templates/schedule/schedule_list.html diff --git a/symposion/schedule/urls.py b/symposion/schedule/urls.py index 8954189d..d259a016 100644 --- a/symposion/schedule/urls.py +++ b/symposion/schedule/urls.py @@ -7,4 +7,5 @@ urlpatterns = patterns("symposion.schedule.views", url(r"^(\w+)/edit/$", "schedule_detail", name="schedule_detail"), url(r"^(\w+)/edit/$", "schedule_edit", name="schedule_edit"), url(r"^edit/slot/(?P\d+)/", "schedule_slot_edit", name="schedule_slot_edit"), + url(r"^list/$", "schedule_list", name="schedule_list"), ) diff --git a/symposion/schedule/views.py b/symposion/schedule/views.py index 59aecba6..08a96227 100644 --- a/symposion/schedule/views.py +++ b/symposion/schedule/views.py @@ -4,7 +4,7 @@ from django.shortcuts import render, get_object_or_404, redirect from django.contrib.auth.decorators import login_required from symposion.schedule.forms import SlotEditForm -from symposion.schedule.models import Schedule, Day, Slot +from symposion.schedule.models import Schedule, Day, Slot, Presentation from symposion.schedule.timetable import TimeTable @@ -24,6 +24,14 @@ def schedule_detail(request, slug=None): return render(request, "schedule/schedule_detail.html", ctx) +def schedule_list(request): + presentations = Presentation.objects.order_by("id") + ctx = { + "presentations": presentations, + } + return render(request, "schedule/schedule_list.html", ctx) + + @login_required def schedule_edit(request, slug=None): diff --git a/symposion/templates/schedule/schedule_list.html b/symposion/templates/schedule/schedule_list.html new file mode 100644 index 00000000..a423050b --- /dev/null +++ b/symposion/templates/schedule/schedule_list.html @@ -0,0 +1,19 @@ +{% extends "site_base.html" %} + +{% load i18n %} + +{% block head_title %}Presentation Listing{% endblock %} + +{% block body %} + {% for presentation in presentations %} +
+
+

{{ presentation.title }}

+

{{ presentation.speaker }} in {{ presentation.proposal.track }}

+

+ {{ presentation.description }} +

+
+
+ {% endfor %} +{% endblock %} From 36ceef63ed87bab882cab7d9e462adbc9ac844e8 Mon Sep 17 00:00:00 2001 From: Luke Hatcher Date: Fri, 31 Aug 2012 01:50:16 -0400 Subject: [PATCH 41/46] no animation --- symposion/templates/schedule/schedule_edit.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symposion/templates/schedule/schedule_edit.html b/symposion/templates/schedule/schedule_edit.html index ebc2cf21..f3210b9f 100644 --- a/symposion/templates/schedule/schedule_edit.html +++ b/symposion/templates/schedule/schedule_edit.html @@ -59,7 +59,7 @@ {% endfor %} -