From 46754d6979d47eb2eb6310647150dc43b84ee3ad Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Wed, 10 Jan 2018 14:54:51 -0600 Subject: [PATCH] serve up a blank / --- hitomi/settings.py | 4 +++- hitomi/urls.py | 3 +++ hitomi/views.py | 8 ++++++++ templates/index.html | 0 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 hitomi/views.py create mode 100644 templates/index.html diff --git a/hitomi/settings.py b/hitomi/settings.py index 9be5a33..d292383 100644 --- a/hitomi/settings.py +++ b/hitomi/settings.py @@ -59,7 +59,9 @@ ROOT_URLCONF = 'hitomi.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [ + os.path.join(BASE_DIR, 'templates'), + ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ diff --git a/hitomi/urls.py b/hitomi/urls.py index d917287..07ade2d 100644 --- a/hitomi/urls.py +++ b/hitomi/urls.py @@ -16,6 +16,9 @@ Including another URLconf from django.contrib import admin from django.urls import path +from hitomi.views import IndexView + urlpatterns = [ + path('', IndexView.as_view(), name='index'), path('admin/', admin.site.urls), ] diff --git a/hitomi/views.py b/hitomi/views.py new file mode 100644 index 0000000..36927f7 --- /dev/null +++ b/hitomi/views.py @@ -0,0 +1,8 @@ +"""Views for miscellaneous site stuff.""" +from django.views.generic import TemplateView + + +class IndexView(TemplateView): + """Serve a very basic index page.""" + + template_name = 'index.html' diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..e69de29