summaryrefslogtreecommitdiff
path: root/pages/views.py
blob: db8e58fac221a07bcccee627720c618f5e51e3cb (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
from django.shortcuts import render
from django.template.loader import render_to_string
from django.http import HttpResponseNotFound, HttpResponseServerError

# Create your views here.
"""
    Renders the required html page
    Input: s: request object
    output: Redirect object returned by render() and Httpresponse() functions.    
"""

def index(req):
    return render(req, "pages/index.html")

def about(req):
    return render(req, "pages/about.html")

def contact(req):
    return render(req, "pages/contact.html")

def info(req):
    return render(req, "pages/info.html")

def downloads(req):
    return render(req, "pages/downloads.html")

def theory(req):
    return render(req, "pages/theory.html")

def procedure(req):
    return render(req, "pages/procedure.html")

def experiments(req):
    return render(req, "pages/experiments.html")

def feedback(req):
    return render(req, "pages/feedback.html") 

def quiz(req):
    return render(req, "pages/quiz.html")   

def e404(req):
    return HttpResponseNotFound(render_to_string('pages/e404.html'))

def e500(req):
    return HttpResponseServerError(render_to_string('pages/e500.html'))