ANJALITRIAL102

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 78

AN INTERNSHIP

REPORT
ON

C LANGUAGE
Submitted in partial fulfillment towards the award of degree in
B.TECH in Computer Science and Engineering
SESSION 2023-24

ODD SEMESTER

NITRA TECHNICAL CAMPUS,


GHAZIABAD
(College Code-802)
Affiliated to Dr. A.P.J. Abdul Kalam Technical University, Lucknow)

DEPARTMENT OF COMPUTER SCIENCE AND


ENGINEERING
&
CSE

SUBMITTED BY :

NAME : ARJUN SINGH

ROLL NO.:

BRANCH/YEAR : CSE(LE) 2nd Year

INDEX
i
ii
ABOUT ORGANIZATION

iii
ACKNOWLEDGEMENT
It is my pleasure to be indebted to various people, who directly or indirectly
contributed in the development of this work and who influenced my
thinking, behavior, and acts during the course of study.

I am also thankful to my friends those give me support to helpful to complete


this project and solve my all difficulties.

I am taking this opportunity to express out gratefulness to the Management,


Teachers and staff.

(Sign of Student)

Name of Student : ARJUN SINGH


Roll No.:
Branch/Year: CSE/ 2nd Year

iv
CERTIFICATE

v
DECLARATION
I, ARJUN SINGH hereby declare that the presented report of Internship
titled “PYTHON” is uniquely prepared by me after the completion of 4
WEEK on the platform of SPI.

I also confirm that the report is only prepared for my academic requirement,
not for any other purpose. It might not be used with the interest of the
opposite party of the any organization.

(Sign of Student)

Name of Student : ARJUN SINGH


Roll No.:
Branch/Year:CSE/ 2nd Year

vi
TECHNOLOGIES TRAINED ON DURING
SUMMER TRAINING

1. HTML: - HTML stand for hypertext markup language, this markup language is
used to design static web pages. HTML contain pre-defined tags, which are useful
to design web pages. HTML describes the structure of a Web page. HTML
consists of a series of elements. HTML elements tell the browser how to display
the content. HTML elements label pieces of content such as "this is a heading",
"this is a paragraph", "this is a link", etc.
2. CSS: - CSS stands for Cascading Style Sheets. CSS describes how HTML
elements are to be displayed on screen, paper, or in other media.CSS is the
language we use to style an HTML document. CSS describes how HTML
elements should be displayed. CSS saves a lot of work. It can control the layout of
multiple web pages all at once. External stylesheets are stored in CSS files.
3. C Language: - C is a general-purpose programming language created by
Dennis Ritchie at the Bell Laboratories in 1972. It is a very popular language,
despite being old. C is strongly associated with UNIX, as it was developed to
write the UNIX operating system. It is one of the most popular programming
language in the world. If you know C, you will have no problem learning other
popular programming languages such as Java, Python, C++, C#, etc, as the syntax
is similar. C is very fast, compared to other programming languages, like Java and
Python C is very versatile; it can be used in both applications and technologies.
4. Javascript: - JavaScript is a scripting or programming language that allows
you to implement complex features on web pages — every time a web page does
more than just sit there and display static information for you to look at —
displaying timely content updates, interactive maps, animated 2D/3D graphics,
scrolling video jukeboxes, etc. — you can bet that JavaScript is probably
involved. It is the third layer of the layer cake of standard web technologies, two
of which (HTML and CSS).
5. Bootstrap: - Bootstrap is the most popular HTML, CSS and JavaScript
framework for developing a responsive and mobile friendly website. It is
absolutely free to download and use. It is a front-end framework used for easier
and faster web development. It includes HTML and CSS based design templates
1
for typography, forms, buttons, tables, navigation, modals, image carousels and
many others. It can also use JavaScript plug-ins. It facilitates you to create
responsive designs.
6. Database: - A database is an organized collection of data, so that it can be
easily accessed and managed. You can organize data into tables, rows, columns,
and index it to make it easier to find relevant information. Database handlers
create a database in such a way that only one set of software program provides
access of data to all the users. The main purpose of the database is to operate a
large amount of information by storing, retrieving, and managing data. There are
many dynamic websites on the World Wide Web nowadays which are handled
through databases. For example, a model that checks the availability of rooms in a
hotel. It is an example of a dynamic website that uses a database. There are many
databases available like MySQL, Sybase, Oracle, MongoDB, Informix,
PostgreSQL, SQL Server, etc.
7. Python: - Python programming language is a high level, object-oriented
programming language with dynamic semantics. It is the main technology of my
internship. Python is a general purpose programming language which is useful to
develop following types of applications:-

 Desktop application
 Web application
 Data Science and data visualization
 Machine Learning
 Embedded System
 Robotics
 Physical computing
 Internet of Things (IOT)
 Game Development.

8. Django Framework: - Django is a web framework written in powerful


python programming language. It is used to develop scalable, secured and easily
maintainable web applications. Basically frameworks are installable softwares,
they provide us pre-designed architecture. By using framework you can develop
software applications more easily. If you develop a software application by using
software technology then you need to write common logics and application

2
specific logics, whereas if you develop software application using framework then
you need to write only application specific logic and framework take care of
common logics. Django is a web framework which follows MVT (Model – View -
Template) pattern. Explanation of MVT is given below:-

 Model – Model contain database part of django application.


 View – View decides response on given request.
 Template – Template is nothing but a simple html page.

3
CHAPTER 1: INTRODUCTION
This project is a web based shopping system for an existing shop. The project objective is
to deliver the online shopping application into android platform. Online shopping is the
process whereby consumers directly buy goods or services from a seller in real-time,
without an intermediary service, over the Internet. It is a form of electronic commerce.
This project is an attempt to provide the advantages of online shopping to customers of a
real shop. It helps buying the products in the shop anywhere through internet by using an
android device. Thus the customer will get the service of online shopping and home
delivery from his favorite shop

OBJECTIVES

An online shopping system is a process in which people (specifically customers) are


being provided with the option of purchasing goods and services directly from the seller,
all in a real-time environment. Online shopping is an application of the internet as
electronic commerce. From the business perspective, customers usually find the products
more attractive, on websites, as they get all the details available there.

People in large number are doing online shopping today, and it is not only because it is
convenient as one can shop from home, but also because there is an ample number of
varieties available, with a high competition of prices, and also it is easy to navigate for
searching regarding any particular item.

For sellers, their product has access to the World-Wide market, which also increases the
number of customers and enhances customer relationships. Also, web stores are a means
for small-scale companies to launch their products at the global level. The main objective
of this project is to develop a web-oriented application that can provide an online
shopping feature to users.

In other words, the project aimed at creating a virtual shop environment for users, in some
handy form, which will be available to them through the internet. Although the idea of
developing online shopping websites is not new in the electronic market and has been
evolved soon after the World Wide Web (www).

4
Problems in Existing System
The present scenario for shopping is to visit the shops and market manually and then from
the available product list one needs to choose the item he or she wants and then pay for
the same item mainly in cash mode is done, as not every society is well educated and
aware to use net banking or card modes or wallets etc.

This system is not much user-friendly as one needs to go to the market physically and
then select items only from the available list. So mostly it is difficult to get the product as
per our desire. Description About the products is less available and are mostly verbal
only. For this type of shopping, one needs to have an ample amount of free time.

Also, not really good markets exist everywhere, so many times good markets become out
of reach for certain people. In the proposed system customers need not go to the shops for
purchasing the products. He/she can order the product he/she wishes to buy through the
use of this system. The shop owner can be the admin of the system.

The shop owner can appoint officials particularly to handle this, who will help the
owner in managing the customers and product orders. The system also endorses a
home delivery system for delivering the purchased products.

5
Proposed System

In the proposed system customer need not go to the shop for buying the products. He can
order the product he wish to buy through the application in his Smartphone. The shop
owner will be admin of the system. Shop owner can appoint moderators who will help
owner in managing the customers and product orders. The system also recommends a
home delivery system for the purchased products.

This system can be implemented to any shop in the locality or to multinational branded
shops having retail outlet chains. The system recommends a facility to accept the orders
24*7 and a home delivery system which can make customers happy. If shops are
providing an online portal where their customers can enjoy easy shopping from
anywhere, the shops won’t be losing any more customers to the trending online shops
such as Flipkart or ebay. Since the application is available in the Smartphone it is easily
accessible and always available.

Features
6
1. Provides the searching facility based on various type of product to customers.
2. Online shopping system also manages the various type of product to customer.
3. It tracks all the information of various types of products to the end customers.
4. Manages the information of customers.
5. Shows the information and description of the various types of products to customer.
6. To increase efficiency of managing the e-commerce platform.
7. It deals with monitoring the information and transaction of payments.
8. Adding, Editing, and updating of records is improved which results in proper resource
management of online shopping system data.

7
ABOUT THE PROJECT
This Project is an online shopping system. The analysis steps of project are given below:-

1.1 Feasibility Study

Feasibility study is the measure of how beneficial or practical the development of an


information system will be to an organization. The Feasibility analysis is a cross life cycle
activity and should be continuously performed throughout the system life cycle.

1.2 Operational Feasibility: -

By providing the web based application, all the users will get a very good facility of
accessing the service to fulfil their requirements. All the user information, information
sharing and selection process is done properly.
Users will feel comfortable by reduction of their work. The system will make handling of
large databases easy. Losing of records will be avoided. Considering all these factors, we
can conclude that all the users and end users will be satisfied by the system.

1.3 Technical Feasibility:-

For the design and development of the system, several software products have been
accommodated.
 Database design – SQLite
 Interface design – HTML, CSS, Java Script and Bootstrap.
 Coding – Python with django framework.
The technology (Python with django framework) has enough efficiency for the
development of the system. Therefore the project is technically feasible.

1.3 Schedule Feasibility: -

The duration of time required for the project has been planned appropriately and it is the
same as the duration of time expected by the client. Therefore the website can be
delivered to the client within the expected time duration, satisfying the client. Hence the
project is feasible in scheduling.

8
1.4 Economic Feasibility: -

According to the resources available and the project scheduling process it is estimated
that the expenses allocated for the web application to be developed, by the client is
sufficient enough. Hence the economical factor has been considered feasible.

1.5 Project Planning & Scheduling:-

Planning is very important part of any software development. In the planning phase, we
decide which features are to be included in the system to make a good system, how much
time do we need to complete the project, what will the cost of the system etc…
A Software Life Cycle or software process is a series of identifiable stages that a software
product undergoes during its development. A software product development effort
usually starts with a project identification and selection stage and then requirements
analysis; design, coding, testing, implementation and maintenance are
undertaken.
A life cycle model identifies all the activities required to develop and maintain a software
product and establishes a precedence ordering among the different activities.
The various phases of Software Development Life Cycle-

 Requirement Analysis
 System Design
 Coding
 Testing
 Implementation

9
Snap Shots

HOME PAGE

REGISTRATION PAGE

10
LOGIN PAGE

USER ACCOUNT PAGE

11
CHANGE PASSWORD PAGE

MY ORDERS PAGE

12
MY CART PAGE

PRODUCTS PAGE

13
Coding

models.py

import datetime

from django.db import models

class Customer(models.Model):

name=models.CharField(max_length=50)

gender=models.CharField(max_length=6)

address=models.TextField()

pincode=models.IntegerField()

contactno=models.CharField(max_length=15)

emailaddress=models.EmailField(max_length=50,primary_key=True)

password = models.CharField(max_length=20, null=True)

regdate=models.DateTimeField(auto_now_add=True)

14
def is_exists(self):

if Customer.objects.filter(emailaddress=self.emailaddress):

return True

else:

False

@staticmethod

def get_customer_by_email(email):

return Customer.objects.get(emailaddress=email)

class Login(models.Model):

userid=models.CharField(max_length=50,primary_key=True)

password=models.CharField(max_length=20)

usertype=models.CharField(max_length=30)

class Category(models.Model):

name= models.CharField(max_length=50)

def __str__(self):

return self.name

@staticmethod

def get_all_category():

return Category.objects.all()

15
class Product(models.Model):

name= models.CharField(max_length=50)

price= models.IntegerField(default=0)

desc =models.CharField(max_length=200)

category= models.ForeignKey(Category, on_delete=models.CASCADE, default=1)

image= models.ImageField(upload_to='newproducts/')

@staticmethod

def get_products_by_categoryid(category_id):

return Product.objects.filter(category=category_id)

@staticmethod

def get_all_products():

return Product.objects.all()

@staticmethod

def get_product_by_id(productid):

return Product.objects.get(id=productid)

class Orders(models.Model):

customer=models.ForeignKey(Customer,on_delete=models.DO_NOTHING)

product=models.ForeignKey(Product,on_delete=models.DO_NOTHING)

price=models.IntegerField()

address=models.CharField(max_length=200)

pincode=models.CharField(max_length=10)

quantity= models.IntegerField()

order_date=models.DateField(default=datetime.datetime.today)
16
completed= models.BooleanField(default=False)

class ShoppingCart(models.Model):

customer = models.ForeignKey(Customer, on_delete=models.DO_NOTHING)

product = models.ForeignKey(Product, on_delete=models.DO_NOTHING)

quantity = models.IntegerField()

admin.py

from django.contrib import admin

from . models import Login, Customer, Product, Category, ShoppingCart, Orders

class AdminProduct(admin.ModelAdmin):

list_display=['name','price','desc','image']

class AdminCategory(admin.ModelAdmin):

list_display=['name']

class AdminCustomer(admin.ModelAdmin):

list_display = ['name', 'emailaddress', 'pincode', 'regdate']

def has_add_permission(self, request, obj=None):

return False

def has_change_permission(self, request, obj=None):

return False

class AdminOrders(admin.ModelAdmin):

list_display=['customer','product','price','quantity','order_date']
17
class AdminShoppingCart(admin.ModelAdmin):

list_display=['customer', 'product', 'quantity']

admin.site.register(Login)

admin.site.register(Customer,AdminCustomer)

admin.site.register(Product,AdminProduct)

admin.site.register(Category,AdminCategory)

admin.site.register(ShoppingCart, AdminShoppingCart)

admin.site.register(Orders, AdminOrders)

ossappurls.py

from django.urls import path

from . import views

urlpatterns=[

path('',views.index,name='index'),

path('about/',views.about,name='about'),

path('product/',views.productPage,name='product'),

path('register/', views.register, name='register'),

path('login/', views.signin, name='login'),

path('user/',views.user, name='user'),

path('orders/',views.orders, name='orders'),

path('logout/', views.signout, name='logout'),


18
path('buynow/', views.buynow, name='buynow'),

path('checkout/', views.checkout, name='checkout'),

path('changepass/', views.changepass, name='changepass'),

path('mycart/', views.mycart, name='mycart'),

path('update_cart/',views.update_cart, name='update_cart'),

views.py

from django.shortcuts import render, redirect

from django.contrib.auth.hashers import make_password, check_password

from . models import Product, Category, Customer,Orders,ShoppingCart

from django.contrib.auth.models import User

from django.contrib.auth import authenticate, login, logout

from django.contrib.auth.decorators import login_required

def index(request):

return render(request,'index.html')

def about(request):

return render(request,'about.html')

def productPage(request):

if request.method == "POST":

return redirect('product')
19
else:

category_id=request.GET.get('category')

data = {}

if category_id:

products= Product.get_products_by_categoryid(category_id)

else:

products = Product.get_all_products()

category = Category.get_all_category()

data['products'] = products

data['category'] = category

return render(request, 'product.html', data)

def register(request):

if request.method == 'POST':

err=None

name= request.POST.get('name')

email = request.POST.get('email')

passwd = request.POST.get('password')

addr = request.POST.get('address')

pin = request.POST.get('pincode')

phone = request.POST.get('phone')

gen = request.POST.get('gender')

20
#Validation

values={'name':name,

'email':email,

'addr':addr,

'pin':pin,

'phone':phone,

'gen':gen,}

customer = Customer(name=name, gender=gen, address=addr, pincode=pin,


contactno=phone, emailaddress=email,

password=passwd)

if not name.isalpha():

err="Invalid Name, please try again"

if not phone.isnumeric() or len(phone)<10:

err="Invalid Contact Number, please try again"

if not pin.isnumeric():

err="Invalid Pincode, please try again"

if customer.is_exists():

err="Email Already Exists"

data={}

data['err']=err

data['values']=values

if err:

return render(request, 'register.html',data)

21
#customer.password=make_password(passwd)

customer.save()

myuser = User.objects.create_user(username=email,email=email, password=passwd)

myuser.save()

err = "You are registered! Try Logging in"

return render(request, 'login.html',{'err':err})

else:

return render(request, 'register.html')

def signin(request):

if request.method == 'POST':

email = request.POST.get('email')

password = request.POST.get('password')

myuser = authenticate(username=email, password=password)

if myuser is not None:

login(request, myuser)

try:

cart=ShoppingCart.objects.filter(customer=Customer.objects.get(emailaddress=request.us
er.username))

except Exception as e:

print(e)

cart=[]

22
request.session['cart']=len(cart)

return redirect('user')

else:

msg="Incorrect Id or password"

return render(request,'login.html',{'msg':msg})

return render(request,'login.html')

@login_required(redirect_field_name='login')

def user(request):

customer = Customer.get_customer_by_email(request.user.username)

data={}

if request.method=='POST':

msg=None

err=None

current_password=request.POST.get('current_password')

new_password = request.POST.get('new_password')

confirm_password = request.POST.get('confirm_password')

if customer.password==current_password:

if new_password==confirm_password:

customer.password=new_password

customer.save()

myuser=User.objects.get(username=request.user.username)

myuser.password=make_password(new_password)
23
myuser.save()

data['msg']='Password Changed Successfully'

else:

return render(request, 'changepass.html', {'err': 'New password and confirm


password does not match'})

else:

return render(request,'changepass.html',{'err':'Incorrect Password'})

data['customer']=customer

return render(request,'user.html',data)

@login_required(redirect_field_name='login')

def orders(request):

orders=Orders.objects.filter(customer=request.user.username).order_by('-order_date')

return render(request,'orders.html',{'orders':orders})

@login_required(redirect_field_name='login')

def changepass(request):

return render(request,'changepass.html')

def signout(request):

logout(request)

request.session.flush()

return redirect('index')

24
@login_required(redirect_field_name='login')

def buynow(request):

data={}

if request.method=='GET':

total=request.GET.get('total')

if int(total) < 1:

err="Total cannot be zero"

return redirect('/mycart/?err='+err)

method = "add_to_cart"

customer = Customer.get_customer_by_email(request.user.username)

cart=ShoppingCart.objects.filter(customer=customer)

data['cart']=cart

else:

method = "buy_now"

productid=request.POST.get('product')

#print(productid)

product=Product.get_product_by_id(productid)

email=request.user.username

customer=Customer.get_customer_by_email(email)

data['product']=product

data['customer']=customer
25
data['method']=method

return render(request,'confirm.html',data)

@login_required(redirect_field_name='login')

def checkout(request):

if request.method=='GET':

customer = Customer.get_customer_by_email(request.user.username)

cart = ShoppingCart.objects.filter(customer=customer)

for items in cart:

order = Orders(customer=items.customer, product=items.product,


quantity=items.quantity,

price=items.product.price, address=items.customer.address,
pincode=items.customer.pincode)

order.save()

ShoppingCart.objects.filter(customer=Customer.get_customer_by_email(request.user.use
rname)).delete()

request.session['cart'] = 0

else:

product=Product.get_product_by_id(request.POST.get('productid'))

customer =Customer.get_customer_by_email(request.POST.get('email'))

quantity = request.POST.get('quantity')

order=Orders(customer=customer,product=product,price=product.price,address=custome
r.address,pincode=customer.pincode,quantity=quantity)
26
order.save()

return render(request,'checkout.html')

@login_required(redirect_field_name='login')

def mycart(request):

if request.method == "GET" and request.GET.get('flag') == "add_to_cart":

category=request.GET.get('category')

product = Product.objects.get(id=request.GET.get('product_id'))

customer = Customer.get_customer_by_email(request.user.username)

cart = ShoppingCart(customer=customer, product=product, quantity=1)

cart.save()

print(request.session.get('cart'))

request.session['cart']=request.session.get('cart')+1

msg="Product Added to Cart"

#return render(request, 'product.html', {'msg':msg})

return redirect('/product/?msg='+msg+'&category='+category)

cart=ShoppingCart.objects.filter(customer=Customer.objects.get(emailaddress=request.us
er.username))

total=sum([cartitem.product.price*cartitem.quantity for cartitem in cart])

return render(request,'mycart.html',{'cart':cart,'total':total})

27
@login_required(redirect_field_name='login')

def update_cart(request):

err=None

if request.method=='POST':

cart_item_id=request.POST.get('cart_item_id')

quantity=request.POST.get('quantity')

if int(quantity) > 0:

cart=ShoppingCart.objects.get(id=cart_item_id)

cart.quantity=quantity

cart.save()

return redirect('mycart')

else:

err="Quantity cannot be less than 1"

elif request.method=='GET' and request.GET.get('cart_item'):

cart_item_id=request.GET.get('cart_item')

try:

ShoppingCart.objects.get(id=cart_item_id).delete()

request.session['cart'] = request.session.get('cart') -1

except Exception as e:

print(e)

pass

else:

try:

28
ShoppingCart.objects.filter(customer=Customer.get_customer_by_email(request.user.use
rname)).delete()

request.session['cart'] = 0

err="Cart Empty"

except Exception as e:

pass

if err:

return redirect('/mycart/?err='+err)

else:

return redirect('/mycart/')

base.html

<!doctype html>

<html lang="en">

{% load static %}

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="{% static 'css/bootstrap.css' %}">

<link rel="stylesheet" href="{% static 'css/style.css' %}">

<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css"
29
integrity="sha512-
1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSL
y85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" referrerpolicy="no-
referrer" />

<script src="{% static 'js/bootstrap.bundle.js' %}"></script>

<title>{% block title %}{% endblock %}</title>

</head>

<body>

<div class="container-fluid">

<!-- outer start -->

{% include 'navbar.html' %}

{% block content %}

{% endblock %}

{% include 'footer.html' %}

</div>

</body>

</html>

changepass.html

{% extends "userbase.html" %}

{% block page_title %}

Change Password
30
{% endblock %}

{% block user %}

{% if err %}

<div class="alert alert-danger" role="alert">

{{err}}

</div>

{% endif %}

<div class="row">

<div class="col-sm">

<form action="{% url 'user' %}" method="post">

{% csrf_token %}

<div class="row mb-3">

<label for="current_password" class="col-sm-2 col-form-label">Current


Password</label>

<div class="col-sm-6">

<input type="password" name="current_password" class="form-control"


id="current_password">

</div>

</div>

<div class="row mb-3">

<label for="new_password" class="col-sm-2 col-form-label">New


Password</label>

<div class="col-sm-6">

<input type="password" name="new_password" class="form-control"


id="new_password">

31
</div>

</div>

<div class="row mb-3">

<label for="confirm_password" class="col-sm-2 col-form-label">Confirm


Password</label>

<div class="col-sm-6">

<input type="password" name="confirm_password" class="form-control"


id="confirm_password">

</div>

</div>

<div class="row mb-3" >

<div class="col-sm-2"></div>

<div class="col-sm-6 d-grid" >

<button type="submit" class="btn btn-warning float-mid" >Change


Password</button>

</div>

</div>

</form>

</div>

</div>

{% endblock %}

confirm.html

{{product.name}}

{{product.price}}
32
{{product.image.url}}

{{customer.address}}

{{customer.pincode}}

{% if method == "add_to_cart" %}

{% for item in cart %}

{{item.product.name}}

{% endfor %}

<a href="{% url 'checkout' %}">Confirm Order</a>

{% else %}

<form action="{% url 'checkout' %}" method="post">

{% csrf_token %}

<input type="text" name="productid" value="{{product.id}}" hidden>

<br><input type="text" name="email" value="{{customer.emailaddress}}" hidden>

<br><input type="text" name="price" value="{{product.price}}" >

<br><input type="text" name="address" value="{{customer.address}}" >

<br><input type="text" name="pincode" value="{{customer.pincode}}" >

<br><input type="text" name="quantity" value="1" hidden>

<br><button type="submit" class="btn btn-warning"> Checkout</button>

</form>

{% endif %}

33
index.html

<!doctype html>

<html lang="en">

{% load static %}

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="{% static 'css/bootstrap.css' %}">

<link rel="stylesheet" href="{% static 'css/style.css' %}">

<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css"
integrity="sha512-
1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSL
y85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" referrerpolicy="no-
referrer" />

<script src="{% static 'js/bootstrap.bundle.js' %}"></script>

<title>Online Shopping System</title>

</head>

<body>

<div class="container-fluid">

34
<!-- outer start -->

{% include "navbar.html" %}

<!-- slider start -->

<div class="row">

<div class="col-sm-12 p-0">

<div id="carouselExampleCaptions" class="carousel slide" data-bs-


ride="false">

<div class="carousel-indicators">

<button type="button" data-bs-target="#carouselExampleCaptions" data-


bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>

<button type="button" data-bs-target="#carouselExampleCaptions" data-


bs-slide-to="1" aria-label="Slide 2"></button>

<button type="button" data-bs-target="#carouselExampleCaptions" data-


bs-slide-to="2" aria-label="Slide 3"></button>

</div>

<div class="carousel-inner">

<div class="carousel-item active">

<img src="static/images/banners/1.png" class="d-block w-100"


alt="...">

<div class="carousel-caption d-none d-md-block">

<h5>First slide label</h5>

<p>Some representative placeholder content for the first slide.</p>

</div>

35
</div>

<div class="carousel-item">

<img src="static/images/banners/3.png" class="d-block w-100"


alt="...">

<div class="carousel-caption d-none d-md-block">

<h5>Second slide label</h5>

<p>Some representative placeholder content for the second slide.</p>

</div>

</div>

<div class="carousel-item">

<img src="static/images/banners/4.png" class="d-block w-100"


alt="...">

<div class="carousel-caption d-none d-md-block">

<h5>Third slide label</h5>

<p>Some representative placeholder content for the third slide.</p>

</div>

</div>

</div>

<button class="carousel-control-prev" type="button" data-bs-


target="#carouselExampleCaptions" data-bs-slide="prev">

<span class="carousel-control-prev-icon" aria-hidden="true"></span>

<span class="visually-hidden">Previous</span>

</button>

<button class="carousel-control-next" type="button" data-bs-


target="#carouselExampleCaptions" data-bs-slide="next">

36
<span class="carousel-control-next-icon" aria-hidden="true"></span>

<span class="visually-hidden">Next</span>

</button>

</div>

</div>

</div>

<!-- slider end -->

<!-- section start -->

<div class="row mt-3">

<div class="col-sm-3 text-center">

<div class="section shadow-sm">

<img src="static/images/section/img7.jpg" alt="">

</div>

<button type="button" class="btn btn-warning mt-2">Warning</button>

</div>

<div class="col-sm-3 text-center">

<div class="section shadow-sm">

<img src="static/images/section/img11.jpg" alt="">

</div>

<button type="button" class="btn btn-warning mt-2">Warning</button>

</div>
37
<div class="col-sm-3 text-center">

<div class="section shadow-sm">

<img src="static/images/section/img8.jpg" alt="">

</div>

<button type="button" class="btn btn-warning mt-2">Warning</button>

</div>

<div class="col-sm-3 text-center">

<div class="section shadow-lg">

<img src="static/images/section/img9.jpeg" alt="">

</div>

<button type="button" class="btn btn-warning mt-2">Warning</button>

</div>

</div>

<!-- section end -->

<!-- product start -->

<div class="row mt-5">

<div class="col-sm-3">

<div class="card">

<img src="static/images/product/img3.jpg" class="card-img-top" alt="...">

<div class="card-body">

<h5 class="card-title">Rs.578 /-</h5>


38
<p class="fw-bold">fruit vinegar</p>

<small class="card-text d-block">Some quick example text to build on


the card title and make up the bulk of the card's content.</small>

<div class="mt-2">

<a href="#" class="btn btn-warning">Add to cart</a>

<a href="#" class="btn btn-warning float-end">Buy Now</a>

</div>

</div>

</div>

</div>

<div class="col-sm-3">

<div class="card">

<img src="static/images/product/img4.jpg" class="card-img-top" alt="...">

<div class="card-body">

<h5 class="card-title">Rs.500 /-</h5>

<p class="fw-bold">fruit vinegar</p>

<small class="card-text d-block">Some quick example text to build on


the card title and make up the bulk of the card's content.</small>

<div class="mt-2">

<a href="#" class="btn btn-warning">Add to cart</a>

<a href="#" class="btn btn-warning float-end">Buy Now</a>

</div>

</div>

</div>

39
</div>

<div class="col-sm-3">

<div class="card">

<img src="static/images/product/img5.jpg" class="card-img-top" alt="...">

<div class="card-body">

<h5 class="card-title">Rs.488 /-</h5>

<p class="fw-bold">fruit vinegar</p>

<small class="card-text d-block">Some quick example text to build on


the card title and make up the bulk of the card's content.</small>

<div class="mt-2">

<a href="#" class="btn btn-warning">Add to cart</a>

<a href="#" class="btn btn-warning float-end">Buy Now</a>

</div>

</div>

</div>

</div>

<div class="col-sm-3">

<div class="card">

<img src="static/images/product/gal10.jpg" class="card-img-top"


alt="...">

<div class="card-body">

<h5 class="card-title">Rs.987 /-</h5>

<p class="fw-bold">fruit vinegar</p>

<small class="card-text d-block">Some quick example text to build on


the card title and make up the bulk of the card's content.</small>
40
<div class="mt-2">

<a href="#" class="btn btn-warning">Add to cart</a>

<a href="#" class="btn btn-warning float-end">Buy Now</a>

</div>

</div>

</div>

</div>

</div>

<div class="row mt-5">

<div class="col-sm-3">

<div class="card">

<img src="static/images/product/img3.jpg" class="card-img-top" alt="...">

<div class="card-body">

<h5 class="card-title">Rs.578 /-</h5>

<p class="fw-bold">fruit vinegar</p>

<small class="card-text d-block">Some quick example text to build on


the card title and make up the bulk of the card's content.</small>

<div class="mt-2">

<a href="#" class="btn btn-warning">Add to cart</a>

<a href="#" class="btn btn-warning float-end">Buy Now</a>

</div>

</div>

</div>

41
</div>

<div class="col-sm-3">

<div class="card">

<img src="static/images/product/img4.jpg" class="card-img-top" alt="...">

<div class="card-body">

<h5 class="card-title">Rs.500 /-</h5>

<p class="fw-bold">fruit vinegar</p>

<small class="card-text d-block">Some quick example text to build on


the card title and make up the bulk of the card's content.</small>

<div class="mt-2">

<a href="#" class="btn btn-warning">Add to cart</a>

<a href="#" class="btn btn-warning float-end">Buy Now</a>

</div>

</div>

</div>

</div>

<div class="col-sm-3">

<div class="card">

<img src="static/images/product/img5.jpg" class="card-img-top" alt="...">

<div class="card-body">

<h5 class="card-title">Rs.488 /-</h5>

<p class="fw-bold">fruit vinegar</p>

<small class="card-text d-block">Some quick example text to build on


the card title and make up the bulk of the card's content.</small>

42
<div class="mt-2">

<a href="#" class="btn btn-warning">Add to cart</a>

<a href="#" class="btn btn-warning float-end">Buy Now</a>

</div>

</div>

</div>

</div>

<div class="col-sm-3">

<div class="card">

<img src="static/images/product/gal10.jpg" class="card-img-top"


alt="...">

<div class="card-body">

<h5 class="card-title">Rs.987 /-</h5>

<p class="fw-bold">fruit vinegar</p>

<small class="card-text d-block">Some quick example text to build on


the card title and make up the bulk of the card's content.</small>

<div class="mt-2">

<a href="#" class="btn btn-warning">Add to cart</a>

<a href="#" class="btn btn-warning float-end">Buy Now</a>

</div>

</div>

</div>

</div>

</div>

43
<!-- product end -->

{% include "footer.html" %}

<!-- outer end -->

</div>

</body>

</html>

login.html

{% extends "base.html" %}

{% block title %}

Login!

{% endblock %}

{% block content %}

<div class="row justify-content-md-center mt-5">

<div class="col-sm-4">

<h2 class="text-center">Login!</h2>

{% if err %}

<div class="alert alert-success" role="alert">

{{err}}

</div>
44
{% endif %}

{% if msg %}

<div class="alert alert-danger" role="alert">

{{msg}}

</div>

{% endif %}

<form class="mt-5" action="{% url 'login' %}" method="post">

{% csrf_token %}

<div class="row mb-3">

<label for="email" class="col-sm-2 col-form-label">Email</label>

<div class="col-sm-10">

<input name="email" type="email" class="form-control" id="email">

</div>

</div>

<div class="row mb-3">

<label for="password" class="col-sm-2 col-form-label">Password</label>

<div class="col-sm-10">

<input name="password" type="password" class="form-control"


id="password">

</div>

</div>

<div class="form-check">

45
<input class="form-check-input" type="checkbox" value=""
id="rememberme">

<label class="form-check-label" for="rememberme">

Remember Me

</label>

</div>

<div class="text-center">

<button type="submit" class="btn btn-warning ">Login</button>

</div>

</form>

</div>

</div>

{% endblock %}

modal.html

<!doctype html>

<html lang="en">

{% load static %}

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

46
<link rel="stylesheet" href="{% static 'css/bootstrap.css' %}">

<link rel="stylesheet" href="{% static 'css/style.css' %}">

<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.2/css/all.min.css"
integrity="sha512-
1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZfpXtYSL
y85pkm9GaYVYMfw5BC1A==" crossorigin="anonymous" referrerpolicy="no-
referrer" />

<script src="{% static 'js/bootstrap.bundle.js' %}"></script>

<title>{% block title %}{% endblock %}</title>

</head>

<body>

<div class="container-fluid">

<!-- headline start -->

<div class="row bg-warning pt-2">

<div class="col-sm-3 pt-2"><i class="fa-solid fa-phone"></i> Call Us: +91


1111111111</div>

<div class="col-sm-3 pt-2"><i class="fa-solid fa-envelope"></i> Mail Us:


[email protected]</div>

<div class="col-sm-6 text-end">

<!-- ====social media icons==== -->

<ul class="smi">

47
<li><i class="fa-brands fa-facebook-f"></i></li>

<li><i class="fa-brands fa-instagram"></i></li>

<li><i class="fa-brands fa-twitter"></i></li>

<li><i class="fa-brands fa-google"></i></li>

</ul>

</div>

</div>

<!-- headline end -->

<!-- navbar start -->

<div class="row">

<div class="col-sm-12">

<nav class="navbar navbar-expand-lg bg-light">

<div class="container-fluid">

<a class="navbar-brand" href="#"><img src="{% static 'images/29.jpg' %}"


alt="" height="50px"></a>

<button class="navbar-toggler" type="button" data-bs-toggle="collapse"


data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">

<span class="navbar-toggler-icon"></span>

</button>

<div class="collapse navbar-collapse" id="navbarSupportedContent">

<ul class="navbar-nav me-auto mb-2 mb-lg-0">

<li class="nav-item">

<a class="nav-link active" aria-current="page" href="{% url 'index'


%}">Home</a>

48
</li>

<li class="nav-item">

<a class="nav-link" href="{% url 'about' %}">About</a>

</li>

<li class="nav-item">

<a class="nav-link" href="{% url 'product' %}">Products</a>

</li>

<li class="nav-item" data-bs-toggle="modal" data-bs-


target="#staticBackdrop">

<a class="nav-link" href="#">Register</a>

</li>

<li class="nav-item">

<a class="nav-link" href="{% url 'login' %}">Login</a>

</li>

</ul>

<form class="d-flex" role="search">

<input class="form-control me-2" type="search" placeholder="Search"


aria-label="Search">

<button class="btn btn-outline-success"


type="submit">Search</button>

</form>

</div>

</div>
49
</nav>

</div>

</div>

<!-- Modal -->

<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-


keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-
hidden="true">

<div class="modal-dialog">

<div class="modal-content">

<div class="modal-header">

<h5 class="modal-title" id="staticBackdropLabel">Modal title</h5>

<button type="button" class="btn-close" data-bs-dismiss="modal" aria-


label="Close"></button>

</div>

<div class="modal-body">

...

</div>

<div class="modal-footer">

<button type="button" class="btn btn-secondary" data-bs-


dismiss="modal">Close</button>

<button type="button" class="btn btn-primary">Understood</button>

</div>

</div>

</div>

</div>

50
<!-- navbar end -->

{% include 'footer.html' %}

</div>

</body>

</html>

mycart.html

{% extends "userbase.html" %}

{% block page_title %}

My Cart

{% endblock %}

{% block user %}

{% if request.GET.err %}

<div class="alert alert-danger" role="alert">

{{request.GET.err}}

</div>

{% endif %}

<div class="row">

<div class="col-sm-9">

<table class="table">

<thead>

<tr>

<th scope="col"></th>
51
<th scope="col">Product</th>

<th scope="col">Price</th>

<th scope="col">Quantity</th>

</tr>

</thead>

<tbody>

{% for cart_item in cart %}

<tr>

<td><img src="{{cart_item.product.image.url}}" style="width: 5rem;


height=5rem"></td>

<td>{{cart_item.product.name}}</td>

<td>Rs. {{cart_item.product.price}}</td>

<td>

<form action="{% url 'update_cart' %}" method="post">

{% csrf_token %}

<input type="number" class="form-control" name="quantity"


value="{{cart_item.quantity}}">

<input type="text" name="cart_item_id" value="{{cart_item.id}}"


hidden>

<button type="submit" class="badge bg-warning text-light"


style="border:none">Update</button>

</form>

</td>

52
<td>

<a href="/update_cart/?cart_item={{cart_item.id}}" class="badge bg-


danger" style="text-decoration:none">Remove</a>

</td>

</tr>

{% endfor %}

</tbody>

</table>

<div class="row">

<div class="col-sm">

<a href="{% url 'update_cart' %}" class="btn btn-warning text-light fw-bold


float-end"> Empty Cart</a>

</div>

</div>

</div>

<div class="col-sm border-light rounded bg-light text-dark">

<h4>

Cart Sub Total:

<small class="text-muted">Rs. {{total}}</small>

</h4>

<div class="row">

<div class="col-sm d-grid" >

<a href="/buynow/?total={{total}}" class="btn btn-warning text-light fw-bold


float-mid" >Checkout</a>
53
</div>

</div>

</div>

</div>

{% endblock %}

navbar.html

{% load static %}

<!-- headline start -->

<div class="row bg-warning pt-2">

<div class="col-sm-3 pt-2"><i class="fa-solid fa-phone"></i> Call Us: +91


1111111111</div>

<div class="col-sm-3 pt-2"><i class="fa-solid fa-envelope"></i> Mail Us:


[email protected]</div>

<div class="col-sm-6 text-end">

<!-- ====social media icons==== -->

<ul class="smi">

<li><i class="fa-brands fa-facebook-f"></i></li>

<li><i class="fa-brands fa-instagram"></i></li>

<li><i class="fa-brands fa-twitter"></i></li>

<li><i class="fa-brands fa-google"></i></li>

</ul>

54
</div>

</div>

<!-- headline end -->

<!-- navbar start -->

<div class="row">

<div class="col-sm-12">

<nav class="navbar navbar-expand-lg bg-light">

<div class="container-fluid">

<a class="navbar-brand" href="#"><img src="{% static 'images/29.jpg' %}"


alt="" height="50px"></a>

<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-


bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-
expanded="false" aria-label="Toggle navigation">

<span class="navbar-toggler-icon"></span>

</button>

<div class="collapse navbar-collapse" id="navbarSupportedContent">

<ul class="navbar-nav me-auto mb-2 mb-lg-0">

<li class="nav-item">

<a class="nav-link active" aria-current="page" href="{% url 'index'


%}">Home</a>

</li>

<li class="nav-item">

<a class="nav-link" href="{% url 'about' %}">About</a>

</li>

<li class="nav-item">

55
<a class="nav-link" href="{% url 'product' %}">Products</a>

</li>

<li class="nav-item">

<a class="nav-link" href="{% url 'register' %}">Register</a>

</li>

{% if user.is_authenticated %}

<li class="nav-item">

<a class="nav-link" href="{% url 'user' %}">My Account</a>

</li>

<li class="nav-item">

<a class="nav-link" href="{% url 'logout' %}">Logout</a>

</li>

{% else %}

<li class="nav-item">

<a class="nav-link" href="{% url 'login' %}">Login</a>

</li>

{% endif %}

</ul>

<div class="">

{% if user.is_authenticated %}

<form action="{% url 'mycart' %}">

<button type="submit" class="btn btn-dark position-relative">


56
<i class="fa fa-shopping-cart large" aria-hidden="true"></i>

{% if request.session.cart > 0 %}

<span class="position-absolute top-0 start-100 translate-middle badge


rounded-pill bg-danger">

{{request.session.cart}}

<span class="visually-hidden">unread messages</span>

{% endif %}

</span>

</button>

</form>

{% endif %}

</div>

<form class="d-flex" role="search">

<input class="form-control me-2" type="search" placeholder="Search" aria-


label="Search">

<button class="btn btn-outline-success" type="submit">Search</button>

</form>

</div>

</div>

</nav>

</div>

57
</div>

<!-- navbar end -->

orders.html

{% extends "userbase.html" %}

{% block page_title %}

My Orders

{% endblock %}

{% block user %}

<div class="row">

<div class="col-sm">

<table class="table">

<thead>

<tr>

<th scope="col"></th>

<th scope="col">Product</th>

<th scope="col">Price</th>

<th scope="col">Quantity</th>

<th scope="col">Order Date</th>

<th scope="col">Status</th>

</tr>

</thead>

<tbody>

58
{% for order in orders %}

<tr>

<td><img src="{{order.product.image.url}}" style="width: 5rem;"></td>

<td>{{order.product.name}}</td>

<td>{{order.price}}</td>

<td>{{order.quantity}}</td>

<td>{{order.order_date}}</td>

<td>{% if not order.completed %}

<span class="badge bg-warning text-dark">Pending</span>

{% else %}

<span class="badge bg-success ">Completed</span>

{% endif %}

</td>

</tr>

{% endfor %}

</tbody>

</table>

</div>

</div>

{% endblock %}

products.html

{% extends "base.html" %}

{% block title %}

Products
59
{% endblock %}

{% block content %}

<!--

{% for x in products %}

<h4>{{x.name}} {{x.price}} {{x.image}}</h4>

{% endfor %}

-->

<!--

{% for ctg in category %}

<p>{{ctg.name}}</p>

{% endfor %}

-->

{% if request.GET.msg %}

<div class="row">

<div class="col-sm">

<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">

<symbol id="check-circle-fill" fill="currentColor" viewBox="0 0 16 16">

<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-


1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0
1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>

</symbol>

</svg>

60
<div class="alert alert-success d-flex align-items-center" role="alert">

<svg class="bi flex-shrink-0 me-2" width="24" height="24" role="img" aria-


label="Success:"><use xlink:href="#check-circle-fill"/></svg>

<div>

{{request.GET.msg}}

</div>

</div>

</div>

</div>

{% endif %}

<div class="row mt-5">

<div class="col-sm-2">

<div class="list-group">

<a href="/product?" class="list-group-item list-group-item-action">All


Products</a>

{% for ctg in category %}

<a href="/product?category={{ctg.id}}" class="list-group-item list-group-item-


action">{{ctg.name}}</a>

{% endfor %}

</div>

</div>

<div class="col-sm">
61
<div class="row">

{% for product in products %}

<div class="col-sm-auto mb-5" >

<div class="card" style="width: 18rem;">

<img src="{{product.image.url}}" class="card-img-top " alt="..."


style="height:15vw;object-fit:cover">

<div class="card-body">

<h5 class="card-title">{{product.name}}</h5>

<p class="card-text">Rs. {{product.price}}</p>

<p class="card-text">{{product.desc}}</p>

<div class="row">

<div class="col-sm">

<a href="/mycart?
product_id={{product.id}}&flag=add_to_cart&category={{request.GET.category}}"
class="btn btn-warning" value="">Add To Card</a>

</div>

<div class="col-sm">

<form action="{% url 'buynow' %}" method="post">

{% csrf_token %}

<input type="text" name="product" value="{{product.id}}" hidden


>

<button type="submit" class="btn btn-warning float-end">Buy


Now</button>

</form></div>

</div>

62
</div>

</div>

</div>

{% endfor %}

</div>

</div>

</div>

{% endblock %}

register.html

{% extends "base.html" %}

{% block title %}

Sign Up!

{% endblock %}

{% block content %}

<div class="row justify-content-md-center mt-5">

<div class="col-sm-4">

<h2 class="text-center">Sign Up!</h2>

{% if err %}

<div class="alert alert-danger" role="alert">


63
{{err}}

</div>

{% endif %}

<form class="mt-5" action="{% url 'register' %}" method="post">

{% csrf_token %}

<div class="row mb-3">

<label for="name" class="col-sm-2 col-form-label">Name</label>

<div class="col-sm-10">

<input name="name" type="text" class="form-control" id="name"


value="{{values.name}}" required>

</div>

</div>

<div class="row mb-3">

<label for="email" class="col-sm-2 col-form-label">Email</label>

<div class="col-sm-10">

<input name="email" type="email" class="form-control" id="email"


value="{{values.email}}" required>

</div>

</div>

<div class="row mb-3">

64
<label for="password" class="col-sm-2 col-form-label">Password</label>

<div class="col-sm-10">

<input name="password" type="password" class="form-control"


id="password" required>

</div>

</div>

<div class="row mb-3">

<label name='address' for="address" class="col-sm-2


form-label">Address</label>

<div class="col-sm-10">

<textarea name="address" class="form-control" id="address" rows="3"


required>{{values.addr}}</textarea>

</div>

</div>

<div class="row mb-3">

<label for="pincode" class="col-sm-2 col-form-label">Pincode</label>

<div class="col-sm-10">

<input name="pincode" type="text" value="{{values.pin}}" class="form-


control" id="pincode" required>

</div>

</div>

<div class="row mb-3">

<label for="phone" class="col-sm-2 col-form-label" >Contact Number</label>

<div class="col-sm-10">

65
<input name="phone" type="text" class="form-control"
value="{{values.phone}}" id="phone" required>

</div>

</div>

<fieldset class="row mb-3">

<legend class="col-form-label col-sm-2 pt-0">Gender</legend>

<div class="col-sm-10">

<div class="form-check">

<input class="form-check-input" type="radio" name="gender"


id="gender1" value="male" required >

<label class="form-check-label" for="gender1">

Male

</label>

</div>

<div class="form-check">

<input class="form-check-input" type="radio" name="gender"


id="gender2" value="female" required>

<label class="form-check-label" for="gender2">

Female

</label>

</div>

</div>

</fieldset>

66
<div class="text-center">

<button type="submit" class="btn btn-warning ">Sign Up</button>

</div>

</form>

</div>

</div>

{% endblock %}

user.html

{% extends "userbase.html" %}

{% block page_title %}

My Account

{% endblock %}

{% block user %}

{% if msg %}

<div class="alert alert-success" role="alert">

{{msg}}

</div>

{% endif %}

<div class="row justify-content-center">

<div class="col-sm-6">

<table class="table" >


67
<tbody>

<tr>

<td class="fw-bold">Name</td><td class="text-


uppercase">{{customer.name}}</td>

</tr>

<tr>

<td class="fw-bold">Email</td><td>{{customer.emailaddress}}</td>

</tr>

<tr>

<td class="fw-bold">Address</td><td class="text-


uppercase">{{customer.address}}</td>

</tr>

<tr>

<td class="fw-bold">Pincode</td><td class="text-


uppercase">{{customer.pincode}}</td>

</tr>

<tr>

<td class="fw-bold">Gender</td><td class="text-


uppercase">{{customer.gender}}</td>

</tr>

<tr>

<td class="fw-bold">Registration Date</td><td class="text-


uppercase">{{customer.regdate}}</td>

</tr>

<tr>

68
<td class="fw-bold">Password</td><td><a href="{% url 'changepass' %}"
class="btn btn-warning">Change Password</a></td>

</tr>

</tbody>

</table>

</div>

</div>

{% endblock %}

userbase.html

{% extends "base.html" %}

{% block title %}

Welcome User

{% endblock %}

{% block content %}

<div class="row justify-content-center mt-5">

<div class="col-sm-6 text-center">

<h4 class="text-uppercase">

{% block page_title %}

{% endblock %}

</h4>

</div>

69
</div>

<div class="row mt-5">

<div class="col-sm-2">

<div class="list-group">

<a href="{% url 'user' %}" class="list-group-item list-group-item-action"> My


Account </a>

<a href="{% url 'orders' %}" class="list-group-item list-group-item-action">My


Orders </a>

<a href="{% url 'mycart' %}" class="list-group-item list-group-item-action">My


Cart </a>

<a href="{% url 'logout' %}" class="list-group-item list-group-item-


action">Logout </a>

</div>

</div>

<div class="col-sm">

{% block user %}

{% endblock %}

</div>

</div>

{% endblock %}

70
Conclusion & Future Scope

The project entitled Online shopping system was completed successfully.

The system has been developed with much care and free of errors and at the same time it
is efficient and less time consuming. The purpose of this project was to develop a web
application and an android application for purchasing items from a shop. This project
helped us in gaining valuable information and practical knowledge on several topics like
designing web pages using html & CSS, usage of responsive templates, designing of Web
applications, and management of database using MySQL. The entire system is secured.
The project also helped us understanding about the development phases of a project and
software development life cycle. We learned how to test different features of a project.

This project has given us great satisfaction in having designed an application which can
be implemented to any nearby shops or branded shops selling various kinds of products
by simple modifications.

There is a scope for further development in our project to a great extent. A number of
features can be added to this system in future like providing moderator more control over
products so that each moderator can maintain their own products. Another feature we
wished to implement was providing classes for customers so that different offers can be
given to each class. System may keep track of history of purchases of each customer and

71
provide suggestions based on their history. These features could have implemented unless
the time did not limit us.

72

You might also like