summaryrefslogtreecommitdiff
path: root/conference/views.py
blob: 18d05d552c60a566bd03af3823c8b9aa34193f6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from django.http import HttpResponse
from django.shortcuts import render_to_response,redirect
from django.template import RequestContext
from django.conf import settings
from models import *
import csv


def home(request):
    return render_to_response('base.html', context_instance=RequestContext(request))
    

def keynote(request):
    return render_to_response('conference/keynote.html', context_instance=RequestContext(request))
    
    
def sponsors(request):
    return render_to_response('conference/sponsors.html', context_instance=RequestContext(request))
    

def tutorials(request):
    tutorials = TalkTutorial.objects.filter(type="tutorial")
    context = {"tutorials":tutorials}
    return render_to_response('conference/tutorials.html', context, context_instance=RequestContext(request))


def talks(request):
    talks = TalkTutorial.objects.filter(type="talk")
    context = {"talks":talks}
    return render_to_response('conference/talks.html', context, context_instance=RequestContext(request))


def details(request, talktutorial_id=None):
    slides = True
    video = True
    details = TalkTutorial.objects.get(id=talktutorial_id)
    if details.slides == "None":
        slides = False
    if details.video == "None":
        video = False
    context = {"detail":details, "slides":slides, "video":video}
    return render_to_response('conference/details.html', context, context_instance=RequestContext(request))