Mansoor PW
Mansoor PW
Mansoor PW
PET WORLD
By
MANSOOR ALI P
K (AJAVSCS005)
March 2024
DEPARTMENT OF COMPUTER
COLLEGE
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.
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
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
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
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.
6
PETWORL Al Jamia Arts and Science
7
PETWORL Al Jamia Arts and Science
2 SYSTEM ANALYSIS
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
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.
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.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
.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.
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
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
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.
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
1
PETWORL Al Jamia Arts and Science
3 SYSTEM MODELLING
1
PETWORL Al Jamia Arts and Science
1
PETWORL Al Jamia Arts and Science
1
PETWORL Al Jamia Arts and Science
1
PETWORL Al Jamia Arts and Science
2
PETWORL Al Jamia Arts and Science
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
• Teachers get information about student Which add-on course they are chosen
2
PETWORL Al Jamia Arts and Science
1. Admin:
• 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.
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:
• 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
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
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.
3
PETWORL Al Jamia Arts and Science
/ / Code
3
PETWORL Al Jamia Arts and Science
except:
/ / Code
• 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
• A good test case is one that has a probability of finding an as yet undiscovered error.
• Testing should begin on a small scale and progress towards testing in large
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.
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.
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.
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
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.
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
• Careful planning
3
PETWORL Al Jamia Arts and Science
9 APPENDIX
4
PETWORL Al Jamia Arts and Science
4
PETWORL Al Jamia Arts and Science
4
PETWORL Al Jamia Arts and Science
4
PETWORL Al Jamia Arts and Science
4
PETWORL Al Jamia Arts and Science
4
PETWORL Al Jamia Arts and Science
{% 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;">
</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();
$.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
{% 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>
{% endblock %}
5
PETWORL Al Jamia Arts and Science
{% extends 'layout.html' %}
{% load static %}
{% block content %}
<style>
.form-group {
margin-bottom: 20px;
}
label {
color: #000;
}
.btn-register {
background-color:
#ff8c00; color: #fff;
}
</style>
<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>
<div id="warning">
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
$('#registrationForm').on('submit', function(event)
{ event.preventDefault();
var csrfToken = $
$.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) {
$('#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