diff options
Diffstat (limited to 'website')
-rw-r--r-- | website/__init__.py | 0 | ||||
-rw-r--r-- | website/admin.py | 3 | ||||
-rw-r--r-- | website/apps.py | 5 | ||||
-rw-r--r-- | website/migrations/__init__.py | 0 | ||||
-rw-r--r-- | website/models.py | 3 | ||||
-rw-r--r-- | website/tests.py | 3 | ||||
-rw-r--r-- | website/urls.py | 8 | ||||
-rw-r--r-- | website/views.py | 14 |
8 files changed, 36 insertions, 0 deletions
diff --git a/website/__init__.py b/website/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/website/__init__.py diff --git a/website/admin.py b/website/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/website/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/website/apps.py b/website/apps.py new file mode 100644 index 0000000..5e338e4 --- /dev/null +++ b/website/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class WebsiteConfig(AppConfig): + name = 'website' diff --git a/website/migrations/__init__.py b/website/migrations/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/website/migrations/__init__.py diff --git a/website/models.py b/website/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/website/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/website/tests.py b/website/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/website/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/website/urls.py b/website/urls.py new file mode 100644 index 0000000..c98f65b --- /dev/null +++ b/website/urls.py @@ -0,0 +1,8 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path('', views.index, name='index'), + path('index', views.index, name='index'), + ] diff --git a/website/views.py b/website/views.py new file mode 100644 index 0000000..8d63b28 --- /dev/null +++ b/website/views.py @@ -0,0 +1,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)) + |