From 1712349965c1131784e2612c26964af798b3496b Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Thu, 9 Jun 2022 14:52:42 +0200 Subject: [PATCH] Add templates --- WTV2D/settings.py | 1 + WTV2D/urls.py | 3 ++- core/templates/core/home.html | 0 core/urls.py | 9 +++++++++ core/views.py | 4 ++++ 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 core/templates/core/home.html create mode 100644 core/urls.py diff --git a/WTV2D/settings.py b/WTV2D/settings.py index b86e25e..55da38a 100755 --- a/WTV2D/settings.py +++ b/WTV2D/settings.py @@ -37,6 +37,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'core.apps.CoreConfig', ] MIDDLEWARE = [ diff --git a/WTV2D/urls.py b/WTV2D/urls.py index ca2382e..b9aae7e 100755 --- a/WTV2D/urls.py +++ b/WTV2D/urls.py @@ -14,8 +14,9 @@ Including another URLconf 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin -from django.urls import path +from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), + path('', include('core.urls')), ] diff --git a/core/templates/core/home.html b/core/templates/core/home.html new file mode 100644 index 0000000..e69de29 diff --git a/core/urls.py b/core/urls.py new file mode 100644 index 0000000..71a3ca8 --- /dev/null +++ b/core/urls.py @@ -0,0 +1,9 @@ +from django.contrib import admin +from django.urls import path +from . import views + +app_name = "menu" + +urlpatterns = [ + path('' , views.home, name="home"), +] diff --git a/core/views.py b/core/views.py index 91ea44a..7648767 100755 --- a/core/views.py +++ b/core/views.py @@ -1,3 +1,7 @@ from django.shortcuts import render # Create your views here. + + +def home(request): + return render(request, 'core/home.html')