From: David Kerkeslager Date: Tue, 1 Mar 2022 23:03:06 +0000 (-0500) Subject: Add a basic index page X-Git-Url: https://code.kerkeslager.com/?a=commitdiff_plain;h=d87f1f4b102d8a7ae758e7d51b5da36f0fe11138;p=climbing.kerkeslager.com Add a basic index page --- 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()