diff options
author | hardythe1 | 2013-10-09 15:00:43 +0530 |
---|---|---|
committer | hardythe1 | 2013-10-09 15:00:43 +0530 |
commit | c02e32aa54933e386819cf3928ef02963c32b278 (patch) | |
tree | 6dfff16012d55a53fe9f33899e797a07e61fa030 /conference/views.py | |
download | SciPy2012-c02e32aa54933e386819cf3928ef02963c32b278.tar.gz SciPy2012-c02e32aa54933e386819cf3928ef02963c32b278.tar.bz2 SciPy2012-c02e32aa54933e386819cf3928ef02963c32b278.zip |
intializing repo with all files
Diffstat (limited to 'conference/views.py')
-rwxr-xr-x | conference/views.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/conference/views.py b/conference/views.py new file mode 100755 index 0000000..18d05d5 --- /dev/null +++ b/conference/views.py @@ -0,0 +1,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)) |