Mansoor PW

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

PETWORLD Al Jamia Arts and Science College

PET WORLD

Project Report Submitted In Partial


Fulfillment of the Requirements for the Award of Degree
of BSc COMPUTER SCIENCE
University of Calicut

By

MANSOOR ALI P
K (AJAVSCS005)

March 2024

Dept.of Computer Science


Al Jamia Arts and Science College
Poopalam, Valamboor(PO)
Perinthalmanna,679325
PETWORLD Al Jamia Arts and Science College

DEPARTMENT OF COMPUTER

SCIENCE AL JAMIA ARTS SCIENCE

COLLEGE

POOPALAM, VALAMBUR (P.O) PERINTHALMANNA,679325

(affiliated to university of Calicut )

CERTIFICATE

This is to certify that the project work entitled PET WORLD is a bonafide record of the project
done by MANSOOR ALI P K (AJAVSCS005) under our supervision and guidance in partial
fulfillment for the award Degree of BSc COMPUTER SCIENCE from the UNIVERSITY OF
CALICUT during the year 2021-2024. The project report has been approved as it satisfied the
academic requirements in respect of project work prescribed for the side degree.

PRINCIPAL HOD GUIDE

Mrs. FARITHA J Mr. HISHAM C.K Mrs. RAGI K HARIDAS

External Viva
Name of Examiner Signature with Date

1.

2.

SIGNATURE
PETWORLD Al Jamia Arts and Science College

DECLARATION

I MANSOOR ALI P K (AJAVSCS015) hereby declare that the project entitled PET WORLD is
submitted to the University of Calicut in partial fulfillment of the requirements for award of degree of
BSC Computer Science, Is a record of original work done by during our period of study at Al Jamia
Arts and Science College, poopalam under the supervision and guidance of Mrs. RAGI K HARIDAS
Asst. Professor in Department of Computer Science.

MANSOOR ALI P

K (AJAVSCS005)

DATE:

PLACE:
PETWORLD Al Jamia Arts and Science College

ACKNOWLEDGEMENT

Let us take this opportunity to thank all those who have been directly or indirectly involved in
making our thesis a success. First of all, I am grateful to God Almighty, for helping us to take the
topic and giving us the interests to pursue this topic, without whose blessing, we could not have been
able to complete the thesis. It is with great pleasure that we place on record our indebtedness and
deepest senses of gratitude to Mr. HISHAM.CK, HOD of Computer Science for his sound counsel
and endless encouragement from time to time.
I am extremely grateful to Mrs. RAGI K HARIDAS our project in charge, for providing
valuable suggestions. I am extremely grateful to the officials of AL JAMIA ARTS AND SCIENCE
COLLEGE who made all arrangements for smooth completion of the dissertation. I am also grateful
to Mrs. FARITHA J principal of AL JAMIA ARTS AND SCIENCE COLLEGE for providing
library, internal and lab facilities. We express our sincere thanks to our family members and friends
who helped us in overcoming all hurdles thus gearing us towards the fulfillment of the tasks that we
had overtaken.

MANSOOR ALI P

K (AJAVSCS005)

DATE:

PLACE:
PETWORLD Al Jamia Arts and Science College

ABSTRACT

Introducing "PETWORLD" an ambitious project aimed at serving the needs of pet enthusiasts
worldwide. In a landscape where such services are scarce, our primary objective is to bridge the gap
by offering a one-stop solution for individuals seeking companionship with pets, those requiring
assistance in caring for their beloved animals, and those in search of high-quality pet accessories. Our
user-friendly website is designed to cater to the diverse needs of pet lovers, offering a seamless
experience with minimal complications and an aesthetically pleasing color scheme. Upon signing in,
users have the freedom to explore the myriad features of World of Pets, including personalized
filtering options to tailor their experience to their preferences. Furthermore, our platform serves as a
valuable resource by providing information on veterinary doctors, empowering users to address their
pets' healthcare needs promptly and effectively. By eliminating the inconvenience of locating nearby
pet stores and navigating through intermediaries, we strive to simplify and enhance the pet ownership
experience for our valued community of users.
In addition to catering to pet enthusiasts and providing essential resources for pet care, World of
Pets extends its services to include professional pet care providers. Whether users require temporary
care for their pets during travel or assistance from experienced caretakers for specialized needs, our
platform connects them with trustworthy individuals who are passionate about ensuring the well-
being of animals. Through our vetted network of caregivers, users can rest assured that their pets are
in capable hands, receiving the attention and care they deserve. Moreover, World of Pets fosters a
sense of community by facilitating interactions between pet owners and caregivers, fostering
relationships built on mutual trust and shared love for animals. With our comprehensive range of
services, encompassing everything from adoption and accessories to veterinary care and professional
pet sitting, World of Pets remains committed to enriching the lives of both pets and their owners
worldwide.
PETWORL Al Jamia Arts and Science

Contents

1 INTRODUCTION 7
1.1 Project Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Existing System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Proposed System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Basic Design Principle of The Project . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 SYSTEM ANALYSIS 9
2.1 Identification of Need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Preliminary Investigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Feasibility Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.1 Technical Feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3.2 Economical Feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.3 Social Feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.4 Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4.1 Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4.2 Django Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4.3 Visual Studio 2023-IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4.4 HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4.5 CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4.6 JAVASCRIPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4.7 AJAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.5 About the Back End . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5.1 Database Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5.2 RDBMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.5.3 MYSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.6 Requirement Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.6.1 Software Requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.6.2 Hardware Requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.7 Software and Hardware Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1
PETWORL Al Jamia Arts and Science

2.7.1 Software Specification...............................................................................................16


2.7.2 Hardware Specification.............................................................................................16

3 SYSTEM MODELLING 17
3.1 Design Methodology..............................................................................................................17
3.2 Use case diagram....................................................................................................................17
3.3 UML Diagram........................................................................................................................18
3.3.1 Activity Diagram.......................................................................................................18
3.4 Entity-Relationship Diagram.................................................................................................19
3.5 Table Description...................................................................................................................20

4 SYSTEM DESIGN 24
4.1 Module Descriptions..............................................................................................................24
4.2 Input Design...........................................................................................................................25
4.3 Database Design.....................................................................................................................25
4.4 Output Design........................................................................................................................27
4.5 User Interface Design.............................................................................................................27
4.6 Data Flow Diagram...............................................................................................................27

5 CODING 34
5.1 Coding Standards Followed....................................................................................................34
5.2 Error Handling........................................................................................................................34

6 CODE REVIEW AND TESTING 36


6.1 Code Review..........................................................................................................................36
6.2 Testing Process.......................................................................................................................37

7 SYSTEM SECURITY MEASURES 38


7.1 Database/Data Security..........................................................................................................38
7.2 Creation of User Profiles And Access Rights........................................................................38

8 IMPLEMENTATION 39
8.1 New System Description........................................................................................................39
8.2 New System Implementation.................................................................................................39

9 APPENDIX 40
2
PETWORL Al Jamia Arts and Science
9.1 Screen Shots of Forms............................................................................................................41
9.2 SAMPLE CODE....................................................................................................................46

10 BIBLIOGRAPHY 55

3
PETWORL Al Jamia Arts and Science

List of Figures
3.1 Use Case Diagram..................................................................................................................17
3.2 Activity Diagram....................................................................................................................18
3.3 E-R Diagram..........................................................................................................................19
3.4 User Profile Table..................................................................................................................19
3.5 Categories Table.....................................................................................................................19
3.6 Post Table...................................................................................................................................... 20
3.7 Product Category Table..........................................................................................................20
3.8 Products Table........................................................................................................................21
3.9 Order Table............................................................................................................................21
3.10 Order Item Table....................................................................................................................22
3.11 Shipping Address Table..........................................................................................................22
3.12 Above depicted are the major shapes used in DFD................................................................27
3.13 Home page..............................................................................................................................39
3.14 Registration page....................................................................................................................39
4.1 Profile Page............................................................................................................................40
9.1 Products page.........................................................................................................................40
9.2 Product Category page...........................................................................................................41
9.3 Services page..........................................................................................................................41
9.4 Veterinary Services page........................................................................................................42
9.5 Care Takers Services page.....................................................................................................42
9.6 Add to Cart page.....................................................................................................................43
9.7 Cart page.................................................................................................................................43
9.8 Contact Us page.....................................................................................................................44
9.9 About Us page........................................................................................................................44

4
PETWORL Al Jamia Arts and Science

PET WORLD

5
PETWORL Al Jamia Arts and Science

1 INTRODUCTION

1.1 Project Background


The Pet World is an innovative online platform catering to the diverse needs of pet enthusiasts
worldwide. With a comprehensive range of offerings, including pet accessories, pet care services,
veterinary guidance, premium pet foods, detailed insights into various breeds, and cutting-edge pet
gadgets, Pet World emerges as a one-stop destination for all things pet-related. The project was
conceptualized with the aim of providing a seamless and enriching experience for pet owners and
lovers, addressing their queries, needs, and desires within the realm of pet care. Recognizing the
growing demand for centralized resources in the ever-expanding pet industry, Pet World aims to
foster a community where individuals can connect, learn, and thrive in their roles as responsible pet
guardians. Through intuitive design and extensive content curation, Pet World endeavors to empower
users with the knowledge and resources necessary to ensure the well-being and happiness of their
beloved animal companions.

The Pet World originated from a deep-seated passion for animals and a recognition of the need for
a comprehensive online hub tailored specifically to the diverse interests of pet enthusiasts.
Understanding the challenges faced by pet owners in accessing reliable information and quality
products, the project sought to bridge the gap between convenience and expertise. By curating a vast
array of resources, from expert advice on pet care to the latest trends in pet accessories and
technologies, Pet World aspires to cultivate a thriving virtual community where individuals can share
experiences, seek guidance, and celebrate the joys of pet ownership. With a commitment to
excellence and a dedication to the welfare of all creatures great and small, Pet World endeavors to
redefine the digital landscape of the pet industry, fostering connections that enrich the lives of both
animals and their human companions.

1.2 Existing System


The existing system for pet services and accessories typically involves scattered online platforms,
brick and motar pet stores, and local service providers. Many pet owners rely on multiple sources to
fulfill their needs, leading to a fragmented experience. Online marketplaces may offer products, but
accessing comprehensive service often requiresengaging with various independent business.
Additionally, the lack of centralized information and reviews can make decision-making challenging
for pet owners seeking reliable products and services.

6
PETWORL Al Jamia Arts and Science

1.3 Proposed System


The proposed system envisions a cohesive online platform that consolidates pet services and
accessories, addressing the shortcomings of the existing scattered landscape. This integrated system
will offer a user-friendly interface with clear navigation, allowing pet owners to effortlessly access a
wide array of services and products for their pets. At its core, the platform aims to create a unified
space that brings together a curated selection of high-quality pet accessories and an extensive range of
services, simplifying the user experience and enabling pet owners to find everything they need in one
place. Covering grooming, training, veterinary care, and more, the platform collaborates with
experienced and reputable service providers to ensure top-tier professionalism without the need to
navigate multiple platforms. Emphasizing a diverse product catalog catering to various pet needs and
preferences, from essentials to trendy accessories, the system aims to meet every pet owner's
requirements. Educational resources, including articles, guides, and expert advice, empower pet
owners with the knowledge they need to provide the best care for their pets. To foster a sense of
community, features such as user reviews, forums, and social interactions will be incorporated into
the platform, encouraging engagement and collaboration among pet owners..

1.4 Basic Design Principle of The Project


In The fundamental design principles guiding "Pet World," an e-commerce platform tailored for pet
enthusiasts, center on user-centricity and robust administrative control. Emphasizing simplicity and
functionality, the user interface is crafted to facilitate seamless navigation, enabling pet owners to
effortlessly explore a wide array of offerings. From pet accessories and care services to veterinary
care, food options, diverse breeds, and innovative gadgets, the website ensures comprehensive
coverage. Intuitive layouts and clear categorization further enhance the user experience, allowing for
efficient product discovery. Yet, to uphold quality standards and accuracy, product management
privileges are exclusively reserved for the admin, who can add, edit, or remove items as needed. This
meticulous approach guarantees consistency and reliability in the product lineup, instilling confidence
in users' purchasing decisions. With meticulous attention to user experience and administrative
oversight,

7
PETWORL Al Jamia Arts and Science

2 SYSTEM ANALYSIS

2.1 Identification of Need


The need for the Pet World project arose from several insights within the pet owner community.
Recognizing that pet owners seek holistic solutions, there was a realization that existing platforms
lacked comprehensive pet care services and resources. Many struggled to find a single platform
offering a diverse array of pet accessories, foods, and reliable information, leading to frustration.
Moreover, as pet owners increasingly prioritize their pets' health, there was a growing demand for
high-quality nutrition and accessories. Pet World aims to address these needs by providing a
comprehensive online destination where pet owners can access a wide range of supplies, expert
advice, and community support.

2.2 Preliminary Investigation


The preliminary investigation for the proposed pet services and accessories project involves
assessing its feasibility and potential. This phase includes defining project scope, identifying key
stakeholders, and conducting high-level assessments of technical, financial, and operational aspects.
Engaging with pet owners and industry professionals provides insights into demand. Market research
identifies competitors, challenges, and opportunities for differentiation. Additionally, examining
technological requirements and costs contributes to the overall feasibility analysis. This groundwork
ensures alignment with market needs and realistic implementation within constraints..

2.3 Feasibility Study


The purpose of the feasibility study is to determine if a problem is worth solving rather than
solving it outright. It involves analyzing the problem and collecting relevant information about the
product, including input data, processing requirements, output data, and system constraints. PET
WORLD has undergone such a study to assess its feasibility for development and deployment in our
college. The study focuses on operational, technical, social, and economic feasibility to ensure the
proposed system is viable and beneficial..

2.3.1 Technical Feasibility

The technical feasibility of the pet services and accessories project entails assessing the current
technology infrastructure and implementation requirements. This encompasses examining scalability,
compatibility, and security aspects to guarantee seamless integration with services such as veterinary
consultations and grooming appointments. Analysis of hardware, software, and network capabilities
is performed to ensure optimal performance. The feasibility study identifies potential challenges and
endeavors to establish a robust technical foundation for the platform's functionalities.

8
PETWORL Al Jamia Arts and Science

2.3.2 Economical Feasibility

In the System Analysis phase of "Pet World," a crucial focus is on Economical Feasibility. This
involves a Cost-Benefit Analysis, evaluating Return on Investment (ROI), and assessing factors like the
payback period, risks, scalability, and sustainability. The goal is to ensure that implementing Pet World
is not just
technologically viable but also economically sound, providing a positive impact on the institution's
finances. This analysis is vital in making informed decisions and ensuring the project aligns with the
institution's economic goals.

2.3.3 Social Feasibility

In conducting a feasibility study for Pet World, the emphasis on social feasibility is paramount.
This aspect delves into the acceptance and integration of the platform within the pet owner
community. It involves understanding whether pet owners are inclined towards using online
platforms for accessing a wide array of pet-related services and products, ranging from accessories
and pet care services to veterinary consultations and specialized foods. Additionally, social feasibility
explores how the platform can foster a sense of belonging and community among pet enthusiasts,
facilitating interactions, sharing experiences, and offering support. By aligning with the social
dynamics and preferences of pet owners, Pet World aims to establish itself as a trusted and valued
resource in the pet care
landscape.

9
PETWORL Al Jamia Arts and Science

2.4 Development Environment

2.4.1 Python

Python is a general purpose and high level programming language. You can use Python for
develop- ing desktop GUI applications, websites and web applications. Also, Python, as a high level
program- ming language, allows you to focus on core functionality of the application by taking care
of common programming tasks. The simple syntax rules of the programming language further makes
it easier for you to keep the code base readable and application maintainable. There are also a number
of reasons why you should prefer Python to other programming languages

2.4.2 Django Framework

.Django is a high-level Python Web framework that encourages rapid development and clean prag-
matic design. A Web framework is a set of components that provide a standard way to develop
websites fast and easily. Django’s primary goal is to ease the creation of complex database-driven
websites.

2.4.3 Visual Studio 2023-IDE

Visual Studio Code features a lightning fast source code editor, perfect for day-to-day use. With
support for hundreds of languages, VS Code helps you be instantly productive with syntax
highlighting, bracket-matching, auto-indentation, box-selection, snippets, and more. Intuitive
keyboard shortcuts, easy customization and community-contributed keyboard shortcut mappings let
you navigate your code with ease. For serious coding, you’ll often benefit from tools with more code
understanding than just blocks of text. Visual Studio Code includes built-in support for IntelliSense
code completion, rich semantic code understanding and navigation, and code refactoring. And when
the coding gets tough, the tough get debugging. Debugging is often the one feature that developers
miss most in a leaner coding experience, so we made it happen. Visual Studio Code includes an
interactive debugger, so you can step through source code, inspect variables, view call stacks, and
execute commands in the console. Here are more details:

• Coding assistance

Regardless of the programming language being used, Visual Studio IDE offers users with a
real-time coding assistant. Its built-in IntelliSense provides descriptions and hints about the
API. It also helps in expediting the process through its auto-complete feature. Moreover, Visual
Studio IDE makes sure that developers don’t lose the last modification they made as they go
through the rest of the code.

1
PETWORL Al Jamia Arts and Science

• Testing platform

The IDE has a host of tools, which are available to all languages, for easily finding and diag-
nosing bugs. The debugging process can also be done remotely, locally, or even in the middle
of production. Aside from that, Visual Studio IDE is equipped with an application testing
platform which empowers developers in making sure that the products they will deploy are of
high quality. Thanks to this, programmers can shift their energies on other aspects of
development instead of spending too much time debugging errors.

• Collaboration support

Visual Studio IDE’s makers believe that more set of eyes can do better than just one which is
why the platform is equipped with collaborative capabilities, thus increasing the productivity of
the team. All these tools are natively integrated within the development lifecycle.

• High customizability

Every user is provided with various customization options by the IDE in different forms, one
of which is extending functionalities by using add-ons and extensions are available from Visual
Studio Marketplace. On top of that, developers can also publish their very own extensions or
add-ons.

2.4.4 HTML

HTML (Hypertext Markup Language) is the fundamental language for creating web pages. It
utilizes tags to structure content, defining elements like headings, paragraphs, and links. HTML is
crucial for web development, serving as the backbone of websites, enabling the presentation and
organization of information. As a key component of the web, it works in conjunction with other
technologies to deliver a seamless online experience.

2.4.5 CSS

CSS, or Cascading Style Sheets, is a crucial web development language that enhances the presen-
tation and layout of HTML documents. It allows designers to control the visual aspects of a website,
including colors, fonts, spacing, and responsiveness. CSS employs a cascading hierarchy to apply
styles, providing flexibility and consistency across web pages for a seamless user experience.

2.4.6 JAVASCRIPT

JavaScript is a versatile, client-side scripting language used in web development. It enables dy-
namic, interactive features on websites, enhancing user experience. As an essential component of the

1
PETWORL Al Jamia Arts and Science

web ecosystem, JavaScript allows developers to create responsive and engaging web applications.
Its widespread adoption and compatibility make it a cornerstone for modern web development.

2.4.7 AJAX

AJAX (Asynchronous JavaScript and XML) is a web development technique enhancing user
experience by allowing asynchronous data retrieval from a server without refreshing the entire page.
Utilizing a combination of JavaScript, XML, HTML, and CSS, AJAX enables seamless, dynamic
content updates, leading to faster and more interactive web applications.

1
PETWORL Al Jamia Arts and Science

2.5 About the Back End

2.5.1 Database Servers

A database server is used to store data in a database. Users can access the data and manipulate it.
There are many types of databases. The most popular among them is the SQL Server and online SQL
IDE.

2.5.2 RDBMS

RDBMS is a type of database management system that stores data in the form of related tables.
Relational database are powerful because they require few assumptions about how data is related or
how it will be extracted from the database. As a result, the same database can be viewed in many
different ways. An important feature of relational systems is that a single database can be spread
across several tables. This differs from flat file database, in which each database is self-contained in a
single table.

2.5.3 MYSQL

MySQL is a widely-used open-source relational database management system (RDBMS).


Developed by Oracle, it empowers diverse applications by efficiently managing and organizing data.
Known for its speed, reliability, and scalability, MySQL is a go-to choice for businesses and
developers seeking a robust and flexible database solution. Its user-friendly interface and extensive
community support make it a popular option in the software development landscape.

2.6 Requirement Specification

2.6.1 Software Requirement

The software requirements specification (SRS) is a means of translating the ideas in the minds of
clients into a formal documentation. This document forms the development and software validation.
The basic reason for the difficulty in software requirement specification comes from the fact that
there are three interested parties–the client, the end users and the software developer. The
requirements document has to be such that the client and the user can understand easily and the
developers can use it as a basis for software development .Due to the diverse parties involved in
software requirement specification, a communication gap exists. This gap arises when the client does
not understand software or the software development processor when the developer does not
understand the client’s problem and application area. SRS bridges this communication gap.

1
PETWORL Al Jamia Arts and Science

Problem analysis is done to obtain a clear understanding of the needs of the clients and the users,
and what exactly is desired from the software. Analysis leads to the actual specification. People
performing the analysis called analysts, are also responsible for specifying the requirements .The
software project is initiated by the client’s needs .In the beginning these needs are in the minds of
various people in the client organization. The requirement analyst has to identify their requirements
by talking to these people and understanding their needs. These people and the existing documents
about the current mode of operation are the basic source of information for the analyst.

2.6.2 Hardware Requirement

Requirements analysis is the process of determining user expectations for a new or modified
product. These features, called requirements, must be quantifiable, relevant and detailed. This step
acquiring all the facts problem specification such as identifying the desired result determining what
information is needed to produce these results and figuring out what process must be carried out to
proceed to get the accurate result.

1
PETWORL Al Jamia Arts and Science

2.7 Software and Hardware Specification

2.7.1 Software Specification

2.7.2 Hardware Specification

1
PETWORL Al Jamia Arts and Science

3 SYSTEM MODELLING

3.1 Design Methodology


Design methodology refers to the development of a system or method for a unique situation. Today
the term is most often applied to technological fields in reference to web design, software or
information system design. The key design methodology is finding the best solution for each design
situation, whether it be in industrial design, architecture or technology. Design methodology stresses
the use of brainstorming to encourage innovative ideas and collaborative thinking to work through
each proposed idea and arrive at the best solution. Meeting the needs and wants of the end user is the
most critical concern. Design methodology also employs basic research methods, such as analysis and
testing.

3.2 Use case diagram

Figure 3.1: Use Case Diagram

1
PETWORL Al Jamia Arts and Science

3.3 UML Diagram

3.3.1 Activity Diagram

Figure 3.2: Activity Diagram

1
PETWORL Al Jamia Arts and Science

3.4 Entity-Relationship Diagram

Figure 3.3: E-R Diagram

1
PETWORL Al Jamia Arts and Science

3.5 Table Description


This project consists of following tables:

Figure 3.5: User Profile

Figure 3.6: Categories Table

1
PETWORL Al Jamia Arts and Science

Figure 3.8: Post Table

Figure 3.9: Product_Category Table

2
PETWORL Al Jamia Arts and Science

Figure 3.11: Product Table

Figure 3.12: Order Table


2
PETWORL Al Jamia Arts and Science

Figure 3.13: Order Item Table

Figure 3.14: Shipping Address Table

2
PETWORL Al Jamia Arts and Science

4 SYSTEM DESIGN
System design is the first step in the development phase for any engineering product or system.
The term “Design” is defined as “The process of principles for the purpose of defining a processor a
system insufficient detail to permit its realization”. And design is most creative and challenging phase
of system development life cycle. It is an approach for the creation of the proposed system is
designed, which will help in the system coding. System design is vital for efficient database
management. It provides the understanding of procedural details necessary for implementing the
system. A number of sub- systems are to be identified which constitute the whole system.

System design high-end decisions are taken regarding the basic system architecture, platforms and
tools to be used. The system design transforms a logical representation of what a given system is re-
quired to be in the physical specification. It is an approach for the creation of the proposed system is
designed, which will help in the system coding. Design starts with system requirement specification
and converts it to a physical reality during the development. Important design fact or such as reliabil-
ity, response time, throughput of the system maintainability, expand-ability etc. should be taken into
account.

System design is the process of developing specifications for the proposed system that meet the
needs established in the structured analysis. A major step in the structured design is the preparation of
input and output design which will be acceptable to the user. Structured design is the process of
planning a new system to replace the old one. Characteristics of well-defined system is:
(1)Acceptability
(2)Decision making
ability (3)Economy
(4)Flexibilit
y
(5)Reliabilit
y
(6)Simplicit
y

4.1 Module Descriptions


• This system helps students to download there study Materials and watch video related
with their topic and teachers also get information about students .

• Teachers get information about student Which add-on course they are chosen

2
PETWORL Al Jamia Arts and Science

1. Admin:

• Admin can manage User and profile.

• Admin can manage product categories.

• Admin can add new products, update, remove products.

• Admin can view and manage orders placed by the user.

• Admin can update website content, including text, images, user information, resetting passwords.

2. User:

• Users can Login with their credentials or can create new account by registering.

• Users can Search Products in their favorable categories and view products.

• Users have the ability to add/remove items to/from the cart and proceed to checkout.

• User can manage Personal Details and preferences.

4.2 Input Design


Input design converts user-oriented inputs to computer- based format, which requires careful
attention. The collection of input data is the most expensive part of the system in terms of the
equipment used and the number of people involved. In input design, data is accepted for computer
processing and input to the system is done through mapping via some map support or links. The input
screens need to be designed very carefully and logically. A set of menus is provided which help for
better application navigation. While entering data in the input forms, proper validation checks are
done and messages will be generated by the system if incorrect data has been entered.

4.3 Database Design


Database design is the process of producing a detailed data model of a database. This data model
contains all the needed logical and physical design choices and physical storage parameters needed to
generate a design in a data definition language, which can then be used to create a database. A fully
attributed data model contains detailed attributes for each entity.

2
PETWORL Al Jamia Arts and Science

The term database design can be used to describe many different parts of the design of an overall
database system. Principally, and most correctly, it can be thought of as the logical design of the base
data structures used to store the data. In the relational model these are the tables and views. In an
object database the entities and relationships map directly to object classes and named relationships.
However, the term database design could also be used to apply to the overall process of designing, not
just the base data structures, but also the forms and queries used as part of the overall database
application within the database management system (DBMS).

The process of doing database design generally consists of a number of steps which will be carried
out by the database designer. Usually, the designer must:

• Determine the data to be stored in the database.

• Determine the relationships between the different data elements.

• Superimpose a logical structure upon the data on the basis of these relationships.

Normalization:

Normalization is the process of efficiently organizing data in a database. There are two goals of the
normalization process: eliminating redundant data (for example, storing the same data in more than
one table) and ensuring data dependencies make sense (only storing related data in a table). Both of
these are worthy goals as they reduce the amount of space a database consumes and ensure that data
is logically stored.

The database community has developed a series of guidelines for ensuring that databases are
normal- ized. These are referred to as normal forms and are numbered from one (the lowest form of
normal- ization, referred to as first normal form or 1NF) through five (fifth normal form or 5NF). In
practical applications, you’ll often see 1NF, 2NF, and 3NF along with the occasional 4NF. Fifth
normal form is very rarely seen.

• First Normal Form(1NF):First normal form (1NF) sets the very basic rules for an organized
database. Create separate tables for each group of related data and identify each row with the
primary key.

• Second Normal Form(2NF): Second normal form (2NF) further addresses the concept of re-
moving duplicate data.

• Third Normal Form(3NF): Third normal form (3NF) goes one large step further .Meet all the
requirements of the second normal form and remove columns that are not dependent upon the
primary key.

2
PETWORL Al Jamia Arts and Science

4.4 Output Design


Outputs are the most important a direct source of information to the user and to the department.
Intelligent output design will improve the systems relationship with the user and help much
indecision- making. Outputs are so used to provide a permanent hard copy of the results for later uses.
The forms used in the system are shown in the appendix. Computer output is the most important and
direct source of information the user. Efficient, intelligible output design should improve the systems
relationship with the user and help in decision making.

4.5 User Interface Design


User interface design or user interface engineering is the design of user interfaces for ma- chines
and software, such as computers, home appliances, mobile devices, and other electronic devices, with
the focus on maximizing usability and the user experience. The goal of user interface design is to
make the user’s interaction as simple and efficient as possible, in terms of accomplishing user goals.
Good user interface design facilitates finishing the task at hand without drawing unnecessary attention
to itself. Graphic design and typography are utilized to support its usability, influencing how the user
performs certain interactions and improving the aesthetic appeal of the design; design aesthetics may
enhance or detract from the ability of users to use the functions of the interface. The design process
must balance technical functionality and visual elements to create a system that is not only
operational but also usable and adaptable to changing user needs.

4.6 Data Flow Diagram


A Data Flow Diagram (DFD) is a graphical representation of flow of data through an information
system, modelling its process aspects. Often they are preliminary step used to create the over view of
a system which can later be elaborated. DFD also be used for visualization of data processing
(Structured design). A DFD shows what kind of information will be input to and output from the
system, where the data will come from and go to and where the data will be stored. It does not show
information about the timing of process, or information about whether process will operate in
sequence or in parallel.

The DFD at the simplest level is referred to as the context analysis diagram. These are referred to
as the explaining its process in detail. Processes are numbered for easy identification and the data
stores, source and destination of data are normally labelled in block letters. Each data flow is labelled
for easy understanding. A data flow diagram (DFD) maps out the flow of information for any process
or system. It uses defined symbols like rectangles, circles and arrows, plus short text labels, to show
data inputs, outputs, storage points and the routes between each destination.

2
PETWORL Al Jamia Arts and Science

Figure 4.1: Above depicted are the major shapes used in DFD.

2
PETWORL Al Jamia Arts and Science

Level 1:Admin

2
PETWORL Al Jamia Arts and Science

Level 1:User

Level 2: Admin

2
PETWORL Al Jamia Arts and Science

Level 2: Admin

3
PETWORL Al Jamia Arts and Science

Level 2:admin

Level 2:User

3
PETWORL Al Jamia Arts and Science

Level 2: User

3
PETWORL Al Jamia Arts and Science

5 CODING

5.1 Coding Standards Followed


Coding standards in software development encompass a set of guidelines and practices that devel-
opers adhere to ensure uniformity, consistency, readability, and maintainability of the code base. One
fundamental aspect involves following a consistent style throughout the project. This entails adopting
a common coding style for naming conventions, indentation, formatting, and commenting,
contributing to a cohesive and easily understandable codebase .The following are the some python
coding standards used in this project.

Comments: Comments are used for in code documentation in Csharp. They add to the
understand- ing of the code. There are lots of tools that you can use to generate documentation, such
as comments and doc-strings, for your own module. Comments should be more verbose so that when
someone reads the code, the person would get the proper understanding of the code and how it is
being used with other pieces of the code. Comments start with the symbol. Anything written after the
hashtag does not get executed by the interpreter. You write documentation strings or doc-strings at
the start of public modules, files, classes and methods. These type of comments start with ””” and end
with ”””.

Maximum Line Length: Generally, it’s good to aim for a line length of 79 characters in your Python
code.It is possible to open files side by side to compare.You can view the whole expression without
scrolling horizontally which adds to better readability and understanding of the code.

5.2 Error Handling


An exception is an event, which occurs during the execution of a program that disrupts the normal
flow of the program’s instructions. In general, when a Python script encounters a situation that it
cannot cope with, it raises an exception. An exception is a Python object that represents an
error.When a Python script raises an exception, it must either handle the exception immediately
otherwise it terminates and quits. The try and except block in Python is used to catch and handle
exceptions. Python executes code following the try statement as a “normal” part of the program. The
code that follows the except statement is the program’s response to any exceptions in the preceding
try clause. If you have some suspicious code that may raise an exception, you can defend your
program by placing the suspicious code in a try: block. After the try: block, include an except:
statement, followed by a block of code which handles the problem as elegantly as possible.

Syntax: Here is simple syntax of try and except


block t r y :

3
PETWORL Al Jamia Arts and Science
/ / Code

3
PETWORL Al Jamia Arts and Science

except:
/ / Code

Here are few important points about the above-mentioned syntax:

• A single try statement can have multiple except statements. This is useful when the try
block contains statements that may throw different types of exceptions.

• You can also provide a generic except clause, which handles any exception.

• After the except clause(s), you can include an else-clause. The code in the else-block executes
if the code in the try: block does not raise an exception.

• The else-block is a good place for code that does not need the try: block’s protection.

3
PETWORL Al Jamia Arts and Science

6 CODE REVIEW AND TESTING

6.1 Code Review


Software Testing is the process of executing a program or system with the intent of finding errors.
Testing involves any activity aimed at evaluating an attribute or capability of a program or system
and determining that it meets its required results. The scope of software testing includes examination
of code as well as execution of that code in various environments and conditions as well as examining
the quality aspects of code: does it do what it is supposed to Do and do what it needs to do. Testing
helps not only to uncover errors introduced during coding, but also locates errors committed during
the previous phases.

Testing Objectives include:

• Testing is a process of executing a program with the intent offending an error.

• A good test case is one that has a probability of finding an as yet undiscovered error.

• A successful test is one that uncovers an undiscovered error.

Testing Principles are:

• All tests should be traceable to end user requirements

• Tests should be planned long before testing begin

• Testing should begin on a small scale and progress towards testing in large

• Exhaustive testing is not possible

• To be most effective testing should be conducted by an independent third party.

Implementation is the stage of the project where the theoretical design is turned into a working
system. At this stage the main workload, the greatest upheaval and the major impact on the existing
system shifts to the user department. If the implementation is not carefully planned and controlled it
can cause chaos and confusion. The implementation stage involves the following tasks :

• Careful planning.

• Investigation of system and constrains. of methods to achieve the changeover.

• Training of staff in the changeover phase.

• Evaluation of the changeover method.

3
PETWORL Al Jamia Arts and Science

The method of implementation and the time scale to be adopted are found out initially. Next the
system is tested properly and the same time users are trained in the new procedures.

6.2 Testing Process


Testing helps not only to uncover errors introduced during coding, but also locates errors
committed during the previous phases. Thus the aim of testing is to uncover requirements, design or
coding errors in the program. Software Testing is a critical element of software quality assurance and
represents the ultimate review of specification, design and coding, Testing present interesting
anomaly for the software engineer.

Unit testing

This is the first of testing. In this different modules are tested against the specification produces
during the design of the modules. It refers to the verification of single program module in an isolated
environment. Unit testing focuses on the modules independently of one another to locate errors.

In our project we test each module and each forms individually. Each forms may tested using
appropriate values. The input screens need to be designed very carefully and logically. While
entering data in the input forms, proper validation checks are done and messages will be generated by
the system if incorrect data has been entered.

Validation Checks

As a web application developer, form validation is a crucial part of your work, and it should not be
underrated as it could lead to security flaws in your application. You should consider it a must if
you’re striving to provide a professional end user experience.

• Basic form validation

• Custom error messages

I always prefer to load common libraries and helpers in the constructor of the controller itself as
it’s a nice habit to avoid code duplication elsewhere in controller methods. We load the form and url
helpers so that we can use the utility methods provided by those helpers throughout the rest of the
application. The form validation library in the constructor, you can access it using the form validation
convention.

3
PETWORL Al Jamia Arts and Science

7 SYSTEM SECURITY MEASURES

7.1 Database/Data Security


Nowadays, databases any web based application by enabling websites to provide varying dynamic
content. Since very sensitive or secret information can be stored in a database, you should strongly
consider protecting your databases. Database security refers to the collective measures used to protect
and secure a database or database management software from illegitimate use and malicious threats
and attacks. It is a broad term that includes a multitude of processes, tools and methodologies that
ensure security within a database environment.

To retrieve or to store any information you need to connect to the database, send a legitimate query,
fetch the result, and close the connection. Nowadays, the commonly used query language in this inter-
action is the Structured Query Language (SQL).In this project we use sqlite 3 for database storage.By
default, a SQLite database does not require user authentication (no-authentication-required database).
After you created a user, the database will be marked as requiring authentication (authentication- re-
quired database). Then, user need to provide username and password when connecting to the database
file.

7.2 Creation of User Profiles And Access Rights


Profile Learning Model starts with identifying the user status; if the user uses the system for the
first time, he enters his personal data and this data is registered in the User Id List. after user login
to the system successfully, he should enter a query that describes his preference. Then, a domain
thesaurus is employed for mapping the domain keywords found in the query to the corresponding
domain concepts. Terms of the proposed domain thesaurus are arranged into separate clusters; each
cluster consists of a set of synonyms and represents a specific concept. For each cluster, one preferred
term is chosen to represent the underlying concept; the other terms are non-preferred terms . The
proposed domain thesaurus considers only the Synonym relation, which specify terms that express the
same concept.

Therefore, a Preference List is constructed. This list contains the extracted domain concept from
Virtual Document entered by the user. The Multi-class Classifier is then used to classify the query
into one of the domain hypotheses. Therefore, the user profile database will be constructed.
Document classification has a good impact in the overall system performance as it simplifies the
matchmaking among the users preferences and those multi classified documents stored in the systems
database during the recommendation process. If the user accepts the recommendation results the
process is then completed. Otherwise, the system merges the user feedback with those in the
Preference List and then updates the user profile data table.

3
PETWORL Al Jamia Arts and Science

8 IMPLEMENTATION
After the system has been tested, the implementation type or the change over technique from the
existing system to the new system is a step-by-step process. In the system at first only a module of
the system is implemented and checked for suitability and efficiency. When the end user related to the
particular module is satisfied with the performance, the next step of implementation is preceded.

Implementation to some extent is also parallel. For instance, modules which are not linked, with
other modules are implemented parallel and the training is the step-by -step process.Backups are
necessary since any time unexpected events may happen. And so during the program execution, the
records are stored in the workspace. This helps to recover the original status of the records from any
accidental updating or intentional deletion of records

8.1 New System Description


The Donors can manage their profile for their company and engage in charity tasks which make
them more dedicated to society. Donors who are registered in the site can ensure their social service
by engaging through charitable tasks. The Admin can manage all the users and can track record of
every actions. Doctors can add patient details who is need for the blood and doctor verifies the donor-
patient match. The donor has a profile in which all his or her blood donation history is available. The
Company employees who are the donors can earn their rewards in their profiles and can engage in
more healthy activities

8.2 New System Implementation


An Implementation plan is a management tool for a specific policy measure, or package of
measures, designed to assist agencies to manage and monitor implementation effectively.
Implementation plans are intended to be scalable and flexible; reflecting the degree of urgency,
innovation, complexity or sensitivity associated with the particular policy measure. The
implementation stage involves following tasks:

• Careful planning

• Investigation of system and constraints

• Design of method to achieve the changeover phase

3
PETWORL Al Jamia Arts and Science

9 APPENDIX

9.1 Screen Shots of Forms

Figure 9.1: Home page

Figure 9.2: Registration page

4
PETWORL Al Jamia Arts and Science

Figure 9.3: Profile page

Figure 9.4: Products page

4
PETWORL Al Jamia Arts and Science

Figure 9.5: Product Category page

Figure 9.6: Services page

4
PETWORL Al Jamia Arts and Science

Figure 9.7: Veterinary Services page

Figure 9.8: Care Takers Service page

4
PETWORL Al Jamia Arts and Science

Figure 9.9: Add to Cart page

Figure 9.10: Add to Cart page

4
PETWORL Al Jamia Arts and Science

Figure 9.12: Contact Us page

Figure 9.11: About Us page

4
PETWORL Al Jamia Arts and Science

1.1 SAMPLE CODE

Code for home page

{% extends 'layout.html' %}
{% load static %}
{% block content %}

<style>

.login {
overflow: hidden;
background-color:
white;
padding: 40px 30px 30px
30px; border-radius: 10px;
position:
absolute; top:
100%;
left: 50%;
width: 400px;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
box-shadow: 5px 10px 10px rgba(2, 128, 144, 0.2);
}
.login::before, .login::after
{ content: "";
position:
absolute; width:
600px; height:
600px;
border-top-left-radius: 40%;
border-top-right-radius: 45%;
border-bottom-left-radius: 35%;
border-bottom-right-radius: 40%;
z-index: -1;
}
.login::before
{ left: 40%;
bottom: -130%;
background-color: rgba(69, 105, 144, 0.15);
-webkit-animation: wawes 6s infinite linear;
-moz-animation: wawes 6s infinite
linear; animation: wawes 6s infinite
linear;
}
.login::after
{ left: 35%;
bottom: -125%;
background-color: rgba(2, 128, 144, 0.2);
-webkit-animation: wawes 7s infinite;

4
PETWORL Al Jamia Arts and Science
-moz-animation: wawes 7s
infinite; animation: wawes 7s
infinite;
}
.login > input {

4
PETWORL Al Jamia Arts and Science
font-family: "Asap", sans-
serif; display: block;
border-radius:
5px; font-size:
16px; background:
white; width:
100%;
border: 0;
padding: 10px
10px; margin: 15px
-10px;
}
.login > button {
font-family: "Asap", sans-
serif; cursor: pointer;
color: #fff;
font-size: 16px;
text-transform:
uppercase; width: 80px;
border: 0;
padding: 10px 0;
margin-top: 10px;
margin-left: -5px;
border-radius:
5px;
background-color: #f45b69;
-webkit-transition: background-color 300ms;
-moz-transition: background-color
300ms; transition: background-color
300ms;
}
.login > button:hover {
background-color:
#f24353;
}

@keyframes wawes
{ from {
-webkit-transform: rotate(0);
-moz-transform: rotate(0);
-ms-transform: rotate(0);
-o-transform:
rotate(0); transform:
rotate(0);
}
to {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform:
rotate(360deg); transform:
rotate(360deg);
}
}
/* a {
text-decoration: none;
color: rgba(255, 255, 255,
0.6); position: absolute;

4
PETWORL Al Jamia Arts and Science
right: 10px;
bottom: 10px;
font-size:
12px;
} */
</style>

4
PETWORL Al Jamia Arts and Science
<div class="hero-area hero-bg" style="height:400px;">
<div class="container">
<div class="row">
<div class="col-lg-9 offset-lg-2 text-center">
<div class="hero-text">
<div class="hero-text-tablecell">
<h1>LOGIN </h1>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container" style="height: 500px;">

<form class="login" id="LoginForm" method="POST" enctype="multipart/form-data" >


{% csrf_token %}
<input type="text" placeholder="Username" name="username" required>
<input type="password" placeholder="Password" name="password" required>
<button type="submit">Login</button>
<div class="alert alert-warning" role="alert" id="warning"
style="display:none;"> Invalid credentials
</div>
</form>

</div>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<script>
$('#LoginForm').on('submit', function(event)
{ event.preventDefault();
var csrfToken = $('[name=csrfmiddlewaretoken]').val();

var formData = new FormData(this);


formData.append('csrfmiddlewaretoken', csrfToken);

$.ajax({
type: 'POST',
url: 'login',
data:
formData,
processData: false,
contentType: false,
success: function(response) {
window.location.href = 'profile';

},
error: function(response) {
$('#warning').show();

setTimeout(function() {
$('#warning').hide();
}, 3000);
//alert(response.responseJSON.error);
}

5
PETWORL Al Jamia Arts and Science
});

5
PETWORL Al Jamia Arts and Science

});

</script>

{% endblock %}

5
PETWORL Al Jamia Arts and Science

Code for home page

{% extends 'layout.html' %}
{% load static %}
{% block content %}
<body>
<style>
.box-element{
padding: 10px;
border-radius:
10px; background-
color: ; box-
shadow: 10px;
}
.cart-row{
display: flex;
padding-bottom:
10px; margin-bottom:
10px;
}
.quantity{
display: inline-
block; padding-
right: 4px;
}
.chg-quantity{
opacity: .8;
cursor:
pointer;
display: block;
}
p{
margin-top: 12px;

}
</style>
<!-- breadcrumb-section -->
<div class="breadcrumb-section breadcrumb-bg">
<div class="container">
<div class="row">
<div class="col-lg-8 offset-lg-2 text-center">
<div class="breadcrumb-text">
<p style="color: blue;">
Your Cart</p>
<h1>Cart</h1>
</
</div> div>
</
div>
</ </div>
div>
<!-- end breadcrumb section -->
<div class="container" style="padding-bottom: 50px;">
<div class="row" style="margin-top: 100px;">
<div class="col-lg-12">
<div class="box-element">
5
PETWORL Al Jamia Arts and Science
<a class="btn btn-outline"style="color:#061e28; text-decoration: none; border: 1px solid transparent;
border- color:#9577ff;"
onmouseover="this.style.color='#9577ff'; this.style.border='1px solid
#051922'; this.style.backgroundColor='#051922'"
onmouseout="this.style.color='#051922';this.style.border='1px solid #9577ff';

5
PETWORL Al Jamia Arts and Science
this.style.backgroundColor='#fff'"
href="{% url 'product' %}">Continue Shopping</a>

<br/>
<br/>
<table class="table">
<tr>
<th>
<h5>Items: <strong>{{order.get_cart_items}}</strong></h5>
</th>
<th>
<h5>Total:<strong>{{order.get_cart_total|floatformat:2}}Rs.</strong></h5>
</th>
<th>
<a style="float:right; margin:-5.5px; color:#061e28; text-decoration: none; border: 1px solid transparent;
border- color:#9577ff;"
onmouseover="this.style.color='#9577ff'; this.style.border='1px solid
#051922'; this.style.backgroundColor='#051922'"
onmouseout="this.style.color='#051922';this.style.border='1px solid #9577ff';this.style.backgroundColor='#fff'"
class="btn btn-outline" href="{% url 'checkout' %}">Checkout</a>
</th>
</tr>
</table>
</div>
<br/>
<div class="box-element">
<div class="cart-row">
<div style="flex:2"></div>
<div style="flex:2">
<strong>Item</strong>
</div>
<div style="flex:1">
<strong>Price</strong>
</div>
<div style="flex:1">
<strong>Quantity</strong>
</div>
<div style="flex:1">
<strong>Total</strong>
</div>
</div>
{% for item in items %}
<div class="cart-row">
<div style="flex:2">
<img class="row-image img-fluid" src="{{item.product.imageURL}}" style="width:
210px; height: auto;border-radius: 20px;" />
</div>
<div style="flex:2" class="d-flex align-items-center">
<p>{{item.product.name}}</p>
</div>
<div style="flex:1" class="d-flex align-items-center">
<p>Rs{{item.product.price|floatformat:2}}</p>
</div>
<div style="flex:1" class="d-flex align-items-center">
<p class="quantity">{{item.quantity}}</p>
<div class="quantity">
<img data-product="{{item.product.id}}" data-action="add" class="chg-quantity update-cart" src="{%
static 'assets\img\uparr.png' %}" style="width: 15px;height: auto;"/>
<img data-product="{{item.product.id}}" data-action="remove" class="chg-quantity update-cart" src="{% static

5
PETWORL Al Jamia Arts and Science
'assets\img\downarr.png' %}" style="width: 15px;height: auto;margin-top: 5px;">

</div>
</div>
<div style="flex:1" class="d-flex align-items-center">
<p>Rs{{item.get_total}}</p>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>

<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-


IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-
cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF"
crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-
eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4=" crossorigin="anonymous"></script>

</script>
{% endblock %}

5
PETWORL Al Jamia Arts and Science

Code for Registration Page

{% extends 'layout.html' %}
{% load static %}
{% block content %}

<style>
.form-group {
margin-bottom: 20px;
}
label {
color: #000;
}
.btn-register {
background-color:
#ff8c00; color: #fff;
}
</style>

<div class="hero-area hero-bg" style="height:400px;">


<div class="container">
<div class="row">
<div class="col-lg-9 offset-lg-2 text-center">
<div class="hero-text">
<div class="hero-text-tablecell">
<h1>Registration </h1>
</div>
</div>
</div>
</div>
</div>
</div>

<div class="container" style=" max-width: 400px;margin: 50px auto;background-color: #fff;padding:


20px;border- radius: 10px;box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);">
<h2 class="text-center">Registration</h2>
<form id="registrationForm" method="POST" enctype="multipart/form-data" >
{% csrf_token %}
<div class="form-group" >
<label for="username">Username</label>
<input type="text" class="form-control" id="username" name="username" required>
</div>
<div class="form-group" >
<label for="name">name</label>
<input type="text" class="form-control" id="name" name="name" required>
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" class="form-control" id="password" name="password" required>
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" class="form-control" id="email" name="email" required>
</div>
<div class="form-group">
5
PETWORL Al Jamia Arts and Science

<label for="image">Image</label>
<input type="file" class="form-control-file" id="image" name="image">
</div>
<div class="form-group">
<label for="address">Address</label>
<textarea class="form-control" id="address" name="address" rows="3" required></textarea>
</div>
<div class="form-group">
<label for="phoneNumber">Phone Number</label>
<input type="tel" class="form-control" id="phoneNumber" name="phonenumber" pattern="[0-9]{10}"
minlength="10" maxlength="10" required>
</div>
<div class="form-group">
<label for="place">Place</label>
<input type="text" class="form-control" id="place" name="place" required>
</div>
<button type="submit" class="btn btn-register btn-block">Register</button>
</form>

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

style="display:none;"> User Registerd Successfully

</div>

<div id="warning">

</div>

</div>

{% comment %} <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> {% endcomment %}

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

<script>

$('#registrationForm').on('submit', function(event)

{ event.preventDefault();

var csrfToken = $

('[name=csrfmiddlewaretoken]').val(); var formData = new

FormData(this); // convert form to array

$.ajax({

5
PETWORL Al Jamia Arts and Science
type: 'POST',

5
PETWORL Al Jamia Arts and Science

url: 'registration',

data: formData,

processData: false,

contentType: false,

success: function(response) {

$('#success').show();

setTimeout(function() {

$('#success').hide();

$('#registrationForm')[0].reset();

}, 3000);

},

error: function(response) {

var errorMessage = response.responseJSON.error;

$('#warning').text(errorMessage);

setTimeout(function() {

$('#warning').text();

}, 3000);

});

});

</script>

{% endblock %}

6
PETWORL Al Jamia Arts and Science

6
PETWORL Al Jamia Arts and Science

END

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy