From d87f1f4b102d8a7ae758e7d51b5da36f0fe11138 Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Tue, 1 Mar 2022 18:03:06 -0500 Subject: [PATCH] Add a basic index page --- src/core/settings.py | 1 + src/core/templates/core/index.html | 16 ++++++++++++++++ src/core/urls.py | 7 +++++-- src/core/views.py | 6 ++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 src/core/templates/core/index.html create mode 100644 src/core/views.py diff --git a/src/core/settings.py b/src/core/settings.py index 541e767..9a0c510 100644 --- a/src/core/settings.py +++ b/src/core/settings.py @@ -37,6 +37,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'core', ] MIDDLEWARE = [ diff --git a/src/core/templates/core/index.html b/src/core/templates/core/index.html new file mode 100644 index 0000000..c2b863c --- /dev/null +++ b/src/core/templates/core/index.html @@ -0,0 +1,16 @@ + + + + + + + + Climbing + + + + + Hello, world + + + diff --git a/src/core/urls.py b/src/core/urls.py index 2b0e1b1..b1a351e 100644 --- a/src/core/urls.py +++ b/src/core/urls.py @@ -16,6 +16,9 @@ Including another URLconf from django.contrib import admin from django.urls import path -urlpatterns = [ +from . import views + +urlpatterns = ( path('admin/', admin.site.urls), -] + path('', views.index), +) diff --git a/src/core/views.py b/src/core/views.py new file mode 100644 index 0000000..3662eb4 --- /dev/null +++ b/src/core/views.py @@ -0,0 +1,6 @@ +from django.views.generic import TemplateView + +class IndexView(TemplateView): + template_name = 'core/index.html' + +index = IndexView.as_view() -- 2.20.1