From 549f0021b7776aa28b2c0aa86f9bcad3ebeeb5f6 Mon Sep 17 00:00:00 2001 From: Pyl Date: Wed, 29 Apr 2020 11:35:48 +0800 Subject: [PATCH] hook view --- .gitignore | 1 + meeting_planner/settings.py | 2 +- meeting_planner/urls.py | 2 ++ website/views.py | 5 +++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f879f8a..f82b2dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ myvenv/ +.vscode/ # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/meeting_planner/settings.py b/meeting_planner/settings.py index 83d5484..c6ca1e9 100644 --- a/meeting_planner/settings.py +++ b/meeting_planner/settings.py @@ -37,7 +37,7 @@ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'website,' + 'website', ] MIDDLEWARE = [ diff --git a/meeting_planner/urls.py b/meeting_planner/urls.py index 73d8c03..86fad19 100644 --- a/meeting_planner/urls.py +++ b/meeting_planner/urls.py @@ -15,7 +15,9 @@ """ from django.contrib import admin from django.urls import path +from website import views urlpatterns = [ path('admin/', admin.site.urls), + path('welcome/', views.welcome) ] diff --git a/website/views.py b/website/views.py index 91ea44a..e78f0f7 100644 --- a/website/views.py +++ b/website/views.py @@ -1,3 +1,8 @@ from django.shortcuts import render +from django.http import HttpResponse # Create your views here. + + +def welcome(request): + return HttpResponse("Welcome to your website Pyl!")