summaryrefslogtreecommitdiff
path: root/website/views.py
blob: 8d63b288c325d9ddc69a1bae649041d95e953afd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from django.shortcuts import render
from django.http import HttpResponse
from django.template import loader
import requests
import uuid

def index(request):
    context = {}
    session_id = uuid.uuid4()
    context['session_id'] = str(session_id)
    request.session['session_id'] = str(session_id)
    template = loader.get_template('index.html')
    return HttpResponse(template.render(context, request))