From f2d4d20e0906c89ac655b48f242c9f0bfa8b741c Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Wed, 27 Nov 2013 12:17:06 +0530 Subject: adding list of abstracts page --- website/views.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'website/views.py') diff --git a/website/views.py b/website/views.py index c3f2918..747f9d4 100644 --- a/website/views.py +++ b/website/views.py @@ -1,5 +1,6 @@ from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response +from models import Paper # Home section def home_page(request): @@ -39,6 +40,21 @@ def schedule_page(request): def invited_speakers_page(request): return render_to_response('invited_speakers.html') +def list_of_abstracts(request): + context = {} + papers = Paper.objects.all() + context['papers'] = papers + return render_to_response('list_abstracts.html', context) + +def abstract_details(request, paper_id=None): + context = {} + paper = Paper.objects.get(id=paper_id) + context['paper'] = paper + if(len(paper.abstract)<=0): + return HttpResponse(paper.abstract) + return render_to_response('abstract_details.html', context) + + def accepted_abstracts_page(request): return render_to_response('accepted_abstracts.html') -- cgit