Changeset - 1b3ef8d4247d
[Not reviewed]
0 2 0
Brian Rosner - 12 years ago 2012-09-21 02:39:34
brosner@gmail.com
added schedule_presentation_detail
2 files changed with 13 insertions and 0 deletions:
0 comments (0 inline, 0 general)
symposion/schedule/urls.py
Show inline comments
...
 
@@ -5,6 +5,7 @@ urlpatterns = patterns("symposion.schedule.views",
 
    url(r"^$", "schedule_detail", name="schedule_detail_slugless"),
 
    url(r"^edit/$", "schedule_edit", name="schedule_edit_slugless"),
 
    url(r"^list/$", "schedule_list", name="schedule_list_slugless"),
 
    url(r"^presentation/(\d+)/$", "schedule_presentation_detail", name="schedule_presentation_detail"),
 
    url(r"^(\w+)/$", "schedule_detail", name="schedule_detail"),
 
    url(r"^(\w+)/edit/$", "schedule_edit", name="schedule_edit"),
 
    url(r"^(\w+)/list/$", "schedule_list", name="schedule_list"),
symposion/schedule/views.py
Show inline comments
...
 
@@ -13,6 +13,8 @@ def fetch_schedule(slug):
 
    qs = Schedule.objects.all()
 
    
 
    if slug is None:
 
        if qs.count() > 1:
 
            raise Http404()
 
        schedule = next(iter(qs), None)
 
        if schedule is None:
 
            raise Http404()
...
 
@@ -96,3 +98,13 @@ def schedule_slot_edit(request, slug, slot_pk):
 
            "slot": slot,
 
        }
 
        return render(request, "schedule/_slot_edit.html", ctx)
 

	
 

	
 
def schedule_presentation_detail(request, pk):
 
    
 
    presentation = get_object_or_404(Presentation, pk=pk)
 
    
 
    ctx = {
 
        "presentation": presentation,
 
    }
 
    return render(request, "schedule/presentation_detail.html", ctx)
0 comments (0 inline, 0 general)