Skip to content

Commit

Permalink
Merge pull request IEEE-VIT#11 from RahulPalve/master
Browse files Browse the repository at this point in the history
1. Added 'Main' as installed app in settings
  • Loading branch information
SameeranB authored Oct 6, 2019
2 parents 742cfba + 4ea672c commit ace09d8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
1 change: 1 addition & 0 deletions Django_To_Do/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'Main',
]

MIDDLEWARE = [
Expand Down
13 changes: 13 additions & 0 deletions Main/templates/Index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<html>
<head><title>Django to Do</title></head>

<body>
<h1>Welcome to Todo List..</h1>
<p>Login if your already registered: </p>
<b><a href="{% url 'login' %}">Login</a></b>

<p>Click on Sign Up button to start creating your to-dos from now.</p>
<b><a href="{% url 'signUp' %}">Sign Up</a></b>
</body>

</html>
5 changes: 4 additions & 1 deletion Main/urls.py
Original file line number Diff line number Diff line change
@@ -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'),

]
9 changes: 8 additions & 1 deletion Main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,12 @@

def index_view(request):
if request.method == 'GET':
return render(request, 'Main/Index.html')
return render(request, 'Index.html')
return HttpResponse(405)

def signUp_view(request):
return HttpResponse(405)


def login_view(request):
return HttpResponse(405)

0 comments on commit ace09d8

Please sign in to comment.