Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
IftekharulAlam authored and IftekharulAlam committed Apr 14, 2021
1 parent f55bea6 commit a79d976
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ecommerce_site/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
path('about.html',views.toAbout, name='about'),
path('contact.html',views.toContact, name='contact'),
path('shop.html', views.toShop, name='shop'),
path('shop-single.html',views.toShopSingle, name='shopsingle')
path('shop-single.html',views.toShopSingle, name='shopsingle'),
path('login', views.toLogin, name="login"),
path('register', views.toRegister, name="register")


]
4 changes: 4 additions & 0 deletions ecommerce_site/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from django.shortcuts import render

# Create your views here.
def toLogin(request):
return render(request, 'login.html')
def toRegister(request):
return render(request, 'register.html')
def toShopSingle(request):
return render(request,'shop-single.html')
def toShop(request):
Expand Down
22 changes: 22 additions & 0 deletions templates/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=\, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="login" method="POST">
{%csrf_token%}
<input type="text" name="username" placeholder="username"><br>
<input type="password" name="password" placeholder="password"><br>
<input type="submit">
</form>
<div>
{%for message in messages%}
<h3>{{message}}</h3>
{%endfor%}
</div>
</body>
</html>
22 changes: 22 additions & 0 deletions templates/register.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="register" method="POST">
{%csrf_token%}
<input type="text" name="first_name" placeholder=" First Name"><br>
<input type="text" name="last_name" placeholder="Last Name"><br>
<input type="text" name="username" placeholder="UserName"><br>
<input type="email" name="email" placeholder="Email"><br>
<input type="password" name="password1" placeholder="Password"><br>
<input type="password" name="password2" placeholder="Confirm Password"><br>
<input type="Submit">
</form>

</body>
</html>

0 comments on commit a79d976

Please sign in to comment.