Add a basic index page
authorDavid Kerkeslager <kerkeslager@gmail.com>
Tue, 1 Mar 2022 23:03:06 +0000 (18:03 -0500)
committerDavid Kerkeslager <kerkeslager@gmail.com>
Tue, 1 Mar 2022 23:03:06 +0000 (18:03 -0500)
src/core/settings.py
src/core/templates/core/index.html [new file with mode: 0644]
src/core/urls.py
src/core/views.py [new file with mode: 0644]

index 541e767..9a0c510 100644 (file)
@@ -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 (file)
index 0000000..c2b863c
--- /dev/null
@@ -0,0 +1,16 @@
+<!doctype html>
+
+<html lang='en'>
+  <head>
+    <meta charset='utf-8'>
+    <meta name='viewport' content='width=device-width, initial-scale=1'>
+
+    <title>Climbing</title>
+    <meta name='author' content='David Kerkeslager'>
+  </head>
+
+  <body>
+    Hello, world
+  </body>
+</html>
+
index 2b0e1b1..b1a351e 100644 (file)
@@ -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 (file)
index 0000000..3662eb4
--- /dev/null
@@ -0,0 +1,6 @@
+from django.views.generic import TemplateView
+
+class IndexView(TemplateView):
+    template_name = 'core/index.html'
+
+index = IndexView.as_view()