diff options
-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/context_processors.py | 7 | ||||
-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 | 7 | ||||
-rw-r--r-- | website/views.py | 12 |
9 files changed, 40 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/context_processors.py b/website/context_processors.py new file mode 100644 index 0000000..8abae49 --- /dev/null +++ b/website/context_processors.py @@ -0,0 +1,7 @@ +from django.conf import settings + +def root_url(request): + """ + Pass your root_url from the settings.py + """ + return {'SITE_URL': settings.ROOT_URL} 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..88a9cac --- /dev/null +++ b/website/urls.py @@ -0,0 +1,7 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path('', views.index, name='index'), +] diff --git a/website/views.py b/website/views.py new file mode 100644 index 0000000..4b6f624 --- /dev/null +++ b/website/views.py @@ -0,0 +1,12 @@ +# Create your views here. + +from django.http import HttpResponse +from django.shortcuts import render +from django.shortcuts import render_to_response +from django.template import loader + + +def index(request): + context = {} + template = loader.get_template('index.html') + return HttpResponse(template.render(context, request)) |