From 02977fd6b6d494f822fd478485af1395dcf6fd7b Mon Sep 17 00:00:00 2001 From: Rahul Palve Date: Sun, 6 Oct 2019 11:23:21 +0530 Subject: [PATCH] 1. Added 'Main' as installed app in settings 2. Created 'Index.html' template 3. Created 'login' and 'signUp' views 4. Added urls for 'login' and 'signUp' views --- Django_To_Do/settings.py | 1 + Main/templates/Index.html | 13 +++++++++++++ Main/urls.py | 5 ++++- Main/views.py | 9 ++++++++- 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 Main/templates/Index.html diff --git a/Django_To_Do/settings.py b/Django_To_Do/settings.py index 9221e7f..8cec438 100644 --- a/Django_To_Do/settings.py +++ b/Django_To_Do/settings.py @@ -37,6 +37,7 @@ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'Main', ] MIDDLEWARE = [ diff --git a/Main/templates/Index.html b/Main/templates/Index.html new file mode 100644 index 0000000..1d2485a --- /dev/null +++ b/Main/templates/Index.html @@ -0,0 +1,13 @@ + + Django to Do + + +

Welcome to Todo List..

+

Login if your already registered:

+ Login + +

Click on Sign Up button to start creating your to-dos from now.

+ Sign Up + + + \ No newline at end of file diff --git a/Main/urls.py b/Main/urls.py index c0e4209..7c0570f 100644 --- a/Main/urls.py +++ b/Main/urls.py @@ -1,6 +1,9 @@ from django.urls import path -from .views import index_view +from .views import index_view, login_view, signUp_view urlpatterns = [ path('', index_view, name='index'), + path('login/', login_view, name='login'), + path('signup/', signUp_view, name='signUp'), + ] diff --git a/Main/views.py b/Main/views.py index a682dc2..c2ef23f 100644 --- a/Main/views.py +++ b/Main/views.py @@ -6,4 +6,11 @@ def index_view(request): if request.method == 'GET': return render(request, 'Index.html') - return HttpResponse(405) \ No newline at end of file + return HttpResponse(405) + +def signUp_view(request): + return HttpResponse(405) + + +def login_view(request): + return HttpResponse(405)