summaryrefslogtreecommitdiff
path: root/website/views.py
blob: 747f9d45f87089dc956c48fd6fff378ce33c70d6 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response
from models import Paper

# Home section
def home_page(request):
    return render_to_response('index.html')

# About section
def venue_page(request):
    return render_to_response('venue.html')

def reaching_venue_page(request):
    return render_to_response('reaching_venue.html')

def contact_page(request):
    return render_to_response('contact.html')

# Call for papers
def call_for_papers_page(request):
    status = ''
    if 'status' in request.GET:
        status = request.GET['status']

    if request.user.is_anonymous():
        current_user = "anonymous"
    else:
        current_user = request.user

    context = {
      'status': status,
      'current_user': current_user
    }
    return render_to_response('papers.html', context)

# Conference Section
def schedule_page(request):
    return render_to_response('schedule.html')

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')

# Register
def register_page(request):
    return render_to_response('register_2013.html')

# Sponsors
def sponsors_page(request):
    return render_to_response('sponsors.html')