Project Report
Project Report
Project Report
Affiliated to
Dr. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY,
LUCKNOW, UTTAR PRADESH, INDIA
SHRI RAMSWAROOP MEMORIAL COLLEGE OF
ENGINEERING AND MANAGEMENT, LUCKNOW
DEPARTMENT OF MCA
CERTIFICATE
DECLARATION
I take this occasion to thank God, almighty for blessing us with his grace and
taking our endeavor to a successful culmination. I extend my sincere and heartfelt
thanks to our esteemed guide, Mrs. Khushnuma Ashraf, for providing me with
the right guidance and advice at the crucial junctures and for showing me the right
way. I extend my sincere thanks to our respected Head of the Department Mr.
Quaim Mehandi for allowing us to use the facilities available in college. I would
like to thank the other faculty members also, at this occasion. Last but not the
least, I would like to thank my friends and family for the support and
encouragement they have given me during the course of our work.
Table Of Content
1 Introduction 3
2 Company Profile 4
3 Proposed System 5
7 Module Description 10
9 E-R Diagram 12
10 Coding 13-68
13 Conclusion 96
14 References 97
1
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Transportation
Buddy
2
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Introduction
Transportation is the intentional movement of humans, animals, and goods from one
location to another. The website typically offers a range of vehicles including cars, trucks,
buses, and other modes of transportation. Users can access the website and choose a
vehicle that meets their needs, based on factors such as size, capacity, and features. Any
company, Businesses, vendors, any individual always need transport for sending and
receiving materials, goods and other products which suits for their requirements. It is a
challenging task to find a transport company which has transport vehicles to provide cost
effective, reliable and on time delivery of their items. Transportation Buddy is a web
application that met all these requirements. Both passengers and goods transports are
available.
3
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Company Profile
Precursor Info Solutions Pvt Ltd in Lucknow is one of the leading businesses in the
Computer Training Institutes for Advanced Java. Also known for Computer Training
Institutes, Institutes, Fabricators, Computer Hardware Training Institutes, Mobile
Application Developers, Computer Training Institutes for Java, Computer Software
Training Institutes, Computer Training Institutes for Python and much more. Find
Address, Contact Number, Reviews & Ratings, Photos, Maps of Precursor Info Solutions
Pvt Ltd, Lucknow.
Established in the year 2014, Precursor Info Solutions Pvt Ltd in Mahanagar, Lucknow is
a top player in the category Computer Training Institutes for Advanced Java in the
Lucknow. This well-known establishment acts as a one-stop destination servicing
customers both local and from other parts of Lucknow
4
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Proposed System
The website will usually have a user-friendly interface and provide clear and detailed
information about the vehicles available for booking. Users can select the dates and times
they need the vehicle, as well as the pickup and drop-off locations. The booking process
is typically streamlined and straightforward, and the website will often provide real-time
availability information. Once the booking is confirmed, users can access their
reservation information and make any necessary changes or cancellations online.
The big attraction of the portal is that every vehicle has installed tracking devices and the
customer as well portal admin can monitor the vehicles carrying goods or personnel via
the portal. Details of the drivers carrying vehicle will be also seen to that customer.
5
MCA Department, SRMCEM, Lucknow
Transportation Buddy
• Streamline the process of booking and scheduling of vehicles with their Drivers.
• Provide real-time tracking and automated notifications to ensure the safety and
well-being of the passengers and vehicles.
• Offer secure and reliable payment options to simplify the financial aspect of the
vehicle transportation process.
• Provide information about the vehicles and drivers, including their qualifications,
certifications, and driving records,
• Provide a user-friendly platform that is accessible and easy to use for every
individual.
• Promote a culture of safety, reliability, and convenience for private vehicle
transportation. Ratings and reviews will be given by the users that will be useful
for all users for the booking of transport vehicles.
6
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Technologies Used
Backend:
Python: Python is an interpreted, object-oriented, high-level programming language
with dynamic semantics. Its high-level built in data structures, combined with dynamic
typing and dynamic binding, make it very attractive for Rapid Application
Development, as well as for use as a scripting or glue language to connect existing
components together. Python's simple, easy to learn syntax emphasizes readability and
therefore reduces the cost of program maintenance. Python supports modules and
packages, which encourages program modularity and code reuse. The Python
interpreter and the extensive standard library are available in source or binary form
without charge for all major platforms, and can be freely distributed.
Frontend:
HTML: HTML stands for HyperText Markup Language. It is used to design web
pages using a markup language. HTML is a combination of Hypertext and Markup
language. Hypertext defines the link between web pages. A markup language is used
to define the text document within the tag which defines the structure of web pages.
This language is used to annotate (make notes for the computer) text so that a
machine can understand it and manipulate text accordingly. Most markup languages
(e.g. HTML) are human-readable.
7
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Database:
8
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Software Requirements: -
Client Side:
Web Browser : Any updated browser
Developer Side:
Browser : Any updated browser
IDE : Visual Studio Code
Language : Python with Django
Database : SQLite
Operating System : Windows
9
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Modules Description
• Client Registration and Login: User has to do registration and login for booking
a vehicle.
• Vehicle Management: Admin will add/update/delete the details of the vehicle for
transportation
• Employee Management: Drivers and other employee’s information will have to
manage by admin.
• Customer Management: Customer information will be maintained by the system
admin
• Vehicle Booking: All vehicles booking request will be seen and accordingly it
will be handled.
• Vehicle Scheduling and Driver Allotment: Allotment of drivers for different
vehicle for different locations according to booking will be managed by admin.
• Rating and Review: Ratings and reviews are given by customers
• Query: Non registered users can contact to the portal admin in case of any query.
• Notification: Admin of the web site can post news related to various schemes and
offers of the transportation company.
• Searching: User can search vehicles according to their needs.
• Online Messaging: All types of user can do communication through this module.
10
MCA Department, SRMCEM, Lucknow
Transportation Buddy
User Admin
11
MCA Department, SRMCEM, Lucknow
Transportation Buddy
E-R Diagram
Login Id Password
Email ID Admin ID
Login
Name
Password
User Admin
Has
Mobile No
Manage
City
Manage
Cargo
Type
Crg ID
Crg Desc
Gender
Payment Employee
Pay desc Name
Mobile no
Cus ID E Mail
Pay ID Desig
12
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Coding
13
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Home Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
<style>
.bg{
background-image: url("{%static 'transportapp/images/trucks/home.jpg'%}");
width: 100%;height: 700px
}
</style>
<script>
function checkLength()
{
did=document.getElementById("distance").value
if(did.length >5)
{
alert("max 5 digits")
return false
}
return true
}
</script>
</head>
<body>
{%include "transportapp/html/common_header.html"%}
<div class="bg">
<!-- <img src= "{%static 'transportapp\images\trucks\T2.jpg'%}" style="width:
100%;height: 500px;"> -->
<h2 style="text-align: center; font: Poppins, sans-serif;font-size: 40px; font-weight:
800;line-height: 48px;color: white;">Online Truck Booking Made Easy</h2>
<div class="row">
<div class="col-6">
<img src="{%static 'transportapp\images\trucks\T40.png'%}" style="height:
450px; width: 650px; margin-top: 90px; margin-left: 50px;">
</div>
<div class="col-6">
<form method="post" action="/fare/" class="needs-validation" onsubmit=" return
checkLength()" novalidate>
{%csrf_token%}
<div style="background-color: white; width: 500px; height: auto; margin-left:
50px;">
14
MCA Department, SRMCEM, Lucknow
Transportation Buddy
15
MCA Department, SRMCEM, Lucknow
Transportation Buddy
completely focus on your core interests whereas leaving the tiring and complex moving
process on us.<br>
Time-critical? No worries – Move Masters will help you!<br>
Our company is equipped with advanced equipment, modern tools, and expertise
that enable us to help our consumers with crucial transportation and supply chain
solutions. We ensure businesses that they will get excellent-quality, prompt, and secure
transportation services irrespective of time-constraint, the heavy load issue, and any other
related problem.<br>
Being the prime logistics services provider, we believe that people, technology,
infrastructure and expertise all work together to help businesses to succeed and
henceforth, we are offering the right blend of all these.<br>
We are a customer-centric firm and our every action is aimed to offer ease and
comfort to them when it comes to booking a truck. Our online truck booking app has
tremendously simplified the process of booking a truck. Whether you are looking for the
companies of online truck booking Hyderabad or online truck booking Mumbai, Move
Masters would always be your right choice.</p>
<br>
<b>Online Truck Booking- A Smart Trucking Move</b><br>
Bored with traditional truck booking practices? Looking for a smart and quick
way to book a truck? No worries! We have introduced an innovative and sophisticated
way to book trucks. Our online truck booking app and online portal will allow you to
book truck online anywhere, anytime.<br>
Online transport booking is just a click away! No matter what type and size of
your load is, we have the necessary infrastructure, equipment and tools to accommodate
your transportation needs. We are a full-service transport company backed by a wide
range of tech-enabled trucks, and experienced & skilled team players to offer you best-in-
class logistics and supply chain solutions.<br>
We offer you an instant pricing option while you try to book a truck using our
mobile app. It will give you a better idea to manage your transportation budget.<br><br>
<b>A trucking company – always there for you!</b><br>
Our safe and affordable transport services will help businesses to drive business
growth. We have years of experience in handling different types of transportation projects
which enable us to help our businesses to focus on their core competencies and business
operations. Our trucking company adds value to businesses at every stage, right from
delivering advanced truck booking solutions to time-bound deliveries of goods anywhere
across the nation.<br>
We are your trusted partner in your digital transformation journey. We have
designed our app while keeping your truck booking needs in mind. No matter whether
transportation involves short distance or long-distance, we are committed to delivering
your goods in a hassle-free, safe and timely manner. How we can help you?<br><br>
<b>Rich industry experience</b><br>
We bring together years of diverse experience in the transport industry. As the best
online transport booking company, we know what all it needs to bring you effective and
affordable solutions to suit your every transport need.<br><br>
<b>Advanced technology</b><br>
16
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Our adoption of technology, proven expertise and a huge network of fleet owners
and drivers helps us to serve you anywhere, anytime across any part of the
country.<br><br>
<b>On-time, every time</b><br>
We understand the value of time for you as well as for us. That is why we try to
deliver your consignment on time, every time.<br><br>
<b>Competitive pricing</b><br>
By designing innovative transport solutions that are targeted to your unique
business requirements, we have created a pricing strategy that works for everyone. Cost
can become a major constraint while hiring our services, but with our most affordable
prices, we won’t let this happen with our clients.<br><br>
<b> Reliability and safety</b><br>
We drive reliability and safety in transport operations through the effective
implementation of advanced security tools and technologies. It further helps you to drive
efficiency and achieve operational excellence.<br><br>
<b>Hassle-free services</b><br>
We provide hassle-free shipping and flawless logistics solutions for all your
Transport needs, whether small or big, to all parts across the country.<br>
Are you looking for a reliable and experienced transport company in India?
Search online for “local transport near me” or “transport company near me”, we are sure
that you will find Move Masters in top results. So, call us now to book our services!
</div>
{%include "transportapp/html/common_footer.html"%}
{%include "transportapp/html/common_js.html"%}
<script src="{% static 'transportapp/js/validation.js'%}"> </script>
</body>
</html>
17
MCA Department, SRMCEM, Lucknow
Transportation Buddy
About Us Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
<style>
.w-100{
height: 50vh;
}
p{
text-align: justify;
}
h4{
font-weight: 700;
}
</style>
</head>
<body>
{%include "transportapp/html/common_header.html"%}
<div style="height:200px;width: 100%; background-color: #02223F;">
<h1 style="font:Yantramanav, sans-serif;font-weight: 900; font-size: 64px;margin-left:
200px;color:white;">ABOUT US</h1>
</div>
<div class="row" style="margin-left: 100px;">
<div class="col-3" style="margin: 20px; background-color: #FEECE7;">
<img src="{%static 'transportapp/images/d1.png'%}" style="height: 80px;">
<h4>Our Vision</h4>
<p style="text-align: justify;">To stay ahead among our rivals in the transport and
logistics industry by providing world-class and innovative moving solutions to our
clients. We wish to become the top choice of our cus- tomers when they are looking for a
reliable, af- fordable and professional transporter.</p>
</div>
<div class="col-3" style="margin: 20px; background-color: #E6E6E9;">
<img src="{%static 'transportapp/images/d2.png'%}" style="height: 80px;">
<h4>Our Mission</h4>
<p style="text-align: justify;">Stay responsive to consumers' requirement,
find innovative and flexible solutions and strive to achieve customer satisfaction
with our per- formance, honesty, and integrity. We aim to achieve our esteemed patrons'
trust and de- velop a lasting relationship with them.</p>
</div>
<div class="col-3" style="margin: 20px; background-color: #E5F3FD;">
<img src="{%static 'transportapp/images/d3.png'%}" style="height: 80px;">
<h4>Our Commitment</h4>
18
MCA Department, SRMCEM, Lucknow
Transportation Buddy
19
MCA Department, SRMCEM, Lucknow
Transportation Buddy
20
MCA Department, SRMCEM, Lucknow
Transportation Buddy
21
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Contact Us Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<style>
.bg{
background-image: url("{%static 'transportapp/images/trucks/home.jpg'%}");
width: 100%;height: 700px
}
</style>
</head>
<body>
{%include "transportapp/html/common_header.html"%}
<!-- <h1>Contact Us page is here</h1> -->
<form method="post" class="needs-validation" action="/Contact_us/" novalidate>
{%csrf_token%}
<div class="row">
<div class="col-5 mt-5 mx-5 ">
<div class="input-group mb-3 mx-5">
<h2 style="text-align: center;font-family: 'Times New Roman', Times, serif;font-
size:40px ;padding-left: 200px; font-weight: 800;">Get In Touch</h2><hr>
<div class="input-group mb-3 mt-2">
<span class="input-group-text"><i class="fas fa-user-alt"></i></span>
<div class="form-floating ">
<input type="text" class="form-control" id="Username" placeholder="Enter
username" name="user_name" required>
<label for="Username">Username</label>
<div class="invalid-feedback">
Please enter your Username.
</div>
</div>
</div>
<div class="input-group mb-3 ">
<span class="input-group-text"><i class="fas fa-envelope"></i></span>
<div class="form-floating ">
<input type="email" class="form-control" id="Useremail"
placeholder="Enter useremail" name="user_email" required>
<label for="Useremail">UserEmail</label>
<div class="invalid-feedback">
Please enter your E-Mail.
</div>
22
MCA Department, SRMCEM, Lucknow
Transportation Buddy
</div>
</div>
<div class="input-group mb-3">
<span class="input-group-text"><i class="fas fa-phone"></i></span>
<div class="form-floating ">
<input type="number" class="form-control" id="Userphone"
placeholder="Enter user Phone No." name="user_phone" required>
<label for="Userphone">Phone No.</label>
<div class="invalid-feedback">
Please enter your phone number.
</div>
</div>
</div>
<div class="input-group mb-3">
<span class="input-group-text"><i class="fas fa-edit"></i></span>
<div class="form-floating ">
<input type="text" class="form-control" id="Usercity" placeholder="Enter
user city" name="user_city" required>
<label for="Usercity">City</label>
<div class="invalid-feedback">
Please enter your city.
</div>
</div>
</div>
<div class="input-group mb-3 ">
<span class="input-group-text"><i class="fas fa-edit"></i></span>
<div class="form-floating ">
<input type="textarea" class="form-control" id="Usermessage"
placeholder="Enter user message" name="user_message" required></textarea>
<label for="Usermessage">Your Message</label>
<div class="invalid-feedback">
Please enter your message.
</div>
</div>
</div>
<div class="text-center mx-5 mt-3" style="padding-left: 200px;">
<button class="btn" style="height:50px;width:100px ; background-color:
#EE7E1A; color: white; font-weight: 700;">Submit</button>
</div>
</div>
</div>
<div class="col-5 mt-5" style="height: 500px;width:50%;background-color:
#EE7E1A; ">
<h1 style="font: size 40px;font-family: 'Times New Roman', Times, serif;text-
align: center; color: white;">Contact Information</h1><hr>
<div class="bg-light">
23
MCA Department, SRMCEM, Lucknow
Transportation Buddy
24
MCA Department, SRMCEM, Lucknow
Transportation Buddy
25
MCA Department, SRMCEM, Lucknow
Transportation Buddy
26
MCA Department, SRMCEM, Lucknow
Transportation Buddy
27
MCA Department, SRMCEM, Lucknow
Transportation Buddy
28
MCA Department, SRMCEM, Lucknow
Transportation Buddy
<td>2.5 BHK</td>
<td>Max Load 7/8/9 Ton</td>
</tr>
<tr>
<td>TATA 22 FEET</td>
<td>22 L x 7.5 W x 7 H</td>
<td>3 BHK</td>
<td>Max Load 10 Ton</td>
</tr>
<tr>
<td>TATA TRUCK (6 TYRE)</td>
<td>17.5 L x 7 W x 7 H</td>
<td></td>
<td>Max Load 9 Ton</td>
</tr>
<tr>
<td>TAURUS 16 T (10 TYRE)</td>
<td>21 L x 7.2 W x 7 H</td>
<td></td>
<td>Max Load 16 Ton</td>
</tr>
<tr>
<td>TAURUS 21 T (12 TYRE)</td>
<td>24 L x 7.3 W x 7 H</td>
<td></td>
<td>Max Load 21 Ton</td>
</tr>
<tr>
<td>TAURUS 25 T (14 TYRE)</td>
<td>28 L x 7.8 W x 7 H</td>
<td></td>
<td>Max Load 25 Ton</td>
</tr>
<tr>
<td>CONTAINER 20 FT</td>
<td>20 L x 8 W x 8 H</td>
<td>4 BHK</td>
<td>Max Load 6.5 Ton</td>
</tr>
<tr>
<td>CONTAINER 32 FT SXL</td>
<td>32 L x 8 W x 8 H</td>
<td>5 BHK</td>
<td>Max Load 7 Ton</td>
</tr>
<tr>
29
MCA Department, SRMCEM, Lucknow
Transportation Buddy
<td>CONTAINER 32 FT MXL</td>
<td>32 L x 8 W x 8 H</td>
<td></td>
<td>Max Load 14 Ton</td>
</tr>
<tr>
<td>CONTAINER 32 FT SXL / MXL HQ</td>
<td>32 L x 8 W x 10 H</td>
<td></td>
<td>Max Load 7 / 14 Ton</td>
</tr>
<tr>
<td>20 FEET OPEN ALL SIDE (ODC)</td>
<td>20 L x 8 W x 8 H</td>
<td></td>
<td>Max Load 7 Ton</td>
</tr>
<tr>
<td>28-32 FEET OPEN-TRAILOR JCB ODC</td>
<td>28-32 L X 8 W x 8 H</td>
<td></td>
<td>Max Load 8 Ton</td>
</tr>
<tr>
<td>32 FEET OPEN-TRAILOR ODC</td>
<td>32 L X 8 W x 8 H</td>
<td></td>
<td>Max Load 25 Ton</td>
</tr>
<tr>
<td>40 FEET OPEN-TRAILOR ODC</td>
<td>40 L X 8 W x 8 H</td>
<td></td>
<td>Max Load 32 Ton</td>
</tr>
</tbody>
</table>
</table>
{%include "transportapp/html/common_footer.html"%}
{%include "transportapp/html/common_js.html"%}
<script src="{% static 'transportapp/js/validation.js'%}"> </script>
</body>
</html>
30
MCA Department, SRMCEM, Lucknow
Transportation Buddy
FAQ Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
</head>
<body>
{%include "transportapp/html/common_header.html"%}
<div style="height:200px;width: 100%; background-color: #02223F;">
<h1 style="font:Yantramanav, sans-serif;font-weight: 900; font-size: 64px;margin-
left: 200px;color:white;">FAQ</h1>
</div>
<div class="row">
<h1 style="font: Yantramanav, sans-serif; font-weight: 700;padding-left:
120px;">FREQUENTLY ASKED QUESTIONS</h1>
<p style="padding-left: 120px;">If you do not find the answer to your question, then
please contact our customer service team who will be happy to assist you</p>
<div class="col-7 mb-3" style="padding-left: 120px;">
<div class="accordion accordion-flush" id="accordionFlushExample">
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingOne">
<button class="accordion-button collapsed" type="button" data-bs-
toggle="collapse" data-bs-target="#flush-collapseOne" aria-expanded="false" aria-
controls="flush-collapseOne">
How do I request a booking?
</button>
</h2>
<div id="flush-collapseOne" class="accordion-collapse collapse" aria-
labelledby="flush-headingOne" data-bs-parent="#accordionFlushExample">
<div class="accordion-body">Our booking system is a simplified process. You
can place a booking request online on our website/App or you can call our customer care
number 73908 11702. Our team after verification finds the nearest truck for you.</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingTwo">
<button class="accordion-button collapsed" type="button" data-bs-
toggle="collapse" data-bs-target="#flush-collapseTwo" aria-expanded="false" aria-
controls="flush-collapseTwo">
How would I know my fare charges & bill amount?
</button>
</h2>
31
MCA Department, SRMCEM, Lucknow
Transportation Buddy
32
MCA Department, SRMCEM, Lucknow
Transportation Buddy
</button>
</h2>
<div id="flush-collapseFive" class="accordion-collapse collapse" aria-
labelledby="flush-headingFive" data-bs-parent="#accordionFlushExample">
<div class="accordion-body">You can definitely do so. However, extra costs for
the extra point of delivery or pick-up will be levied accordingly. Our team will provide
you with the additional cost incurred at the time of booking. </div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingSix">
<button class="accordion-button collapsed" type="button" data-bs-
toggle="collapse" data-bs-target="#flush-collapseSix" aria-expanded="false" aria-
controls="flush-collapseSix">
How can I cancel my booking? Will I be charged a cancellaton fee?
</button>
</h2>
<div id="flush-collapseSix" class="accordion-collapse collapse" aria-
labelledby="flush-headingSix" data-bs-parent="#accordionFlushExample">
<div class="accordion-body">Currently, you are required to raise a cancellation
request through the customer care number available on our website. Cancellation will
then be approved as per the terms and conditions. A cancellation fee would also be
applicable if our Truck has reached client pickup location.</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingSeven">
<button class="accordion-button collapsed" type="button" data-bs-
toggle="collapse" data-bs-target="#flush-collapseSeven" aria-expanded="false" aria-
controls="flush-collapseSeven">
Is there a possibility of truck being a no-show once the booking has been
confirmed?
</button>
</h2>
<div id="flush-collapseSeven" class="accordion-collapse collapse" aria-
labelledby="flush-headingSeven" data-bs-parent="#accordionFlushExample">
<div class="accordion-body">We are committed to fulfil our responsibility
toward all confirmed bookings. In the event of not being able to do so due to unforeseen
circumstances, you will be notified well ahead of the pick-up time.
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingThree">
33
MCA Department, SRMCEM, Lucknow
Transportation Buddy
34
MCA Department, SRMCEM, Lucknow
Transportation Buddy
35
MCA Department, SRMCEM, Lucknow
Transportation Buddy
36
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Feedback Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<style>
.rating {
display: flex;
flex-direction: row-reverse;
justify-content: center;
}
.rating > input{
display:none;
}
.rating > label {
position: relative;
/* width: 1.1em; */
width: 2rem;
/* font-size: 15vw; */
font-size: 40px;
color: #FFD700;
cursor: pointer;
}
.rating > label::before{
content: "\2605";
position: absolute;
opacity: 0;
}
.rating > label:hover:before,
.rating > label:hover ~ label:before {
opacity: 1 !important;
}
.rating > input:checked ~ label:before{
opacity:1;
}
.rating:hover > input:checked ~ label:before{
opacity: 0.4;
}
</style>
</head>
<body>
{% include "transportapp/html/common_header.html" %}
37
MCA Department, SRMCEM, Lucknow
Transportation Buddy
38
MCA Department, SRMCEM, Lucknow
Transportation Buddy
39
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Review Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
</head>
<body>
{%include "transportapp/html/common_header.html"%}
<div class="row row-cols-1 row-cols-md-4 g-4">
{% for obj in feed_key %}
<div class="col">
<div class="card " style="width: 18rem;">
<div class="card-body">
<h5 class="card-title">{{obj.name}}</h5>
<h6 class="card-subtitle mb-2 text-muted">Stars:- {{obj.ratings}}</h6>
<p class="card-text">{{obj.feedback_text}}</p>
</div>
</div>
</div>
{% endfor %}
</div>
{%include "transportapp/html/common_footer2.html"%}
{%include "transportapp/html/common_js.html"%}
</body>
</html>
40
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Login Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
<style>
body{
font:Poppins, sans-serif;
}
</style>
</head>
<body>
{%include "transportapp/html/common_header.html"%}
<form method="post" class="needs-validation" action="/Login/" novalidate>
{%csrf_token%}
<section class="vh-75" style="background-color: #02223F;">
<div class="container py-5 h-100">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col col-xl-10">
<div class="card" style="border-radius: 1rem;">
<div class="row g-0">
<div class="col-md-6 col-lg-5 d-none d-md-block">
<img src="{%static 'transportapp/images/trucks/driver1.jpg'%}"
alt="login form" class="img-fluid" style="border-radius: 1rem 0 0 1rem;
height: 700px;" />
</div>
<div class="col-md-6 col-lg-7 d-flex align-items-center">
<div class="card-body p-4 p-lg-5 text-black">
<form>
<div class="d-flex align-items-center mb-3 pb-1">
<img src="{%static 'transportapp/images/Logo.png'%}" height="90px"
width="100px" >
<span class="h1 fw-bold mb-0" style="margin-left: 20px;">Move
Masters</span>
</div>
<h5 class="fw-normal mb-3 pb-3" style="letter-spacing: 1px;">Login into
your account</h5>
{% if messages %}
{% for m in messages %}
<div class="alert alert-danger d-flex align-items-center" role="alert">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
fill="currentColor" class="bi bi-exclamation-triangle-fill flex-shrink-0 me-2"
viewBox="0 0 16 16" role="img" aria-label="Warning:">
41
MCA Department, SRMCEM, Lucknow
Transportation Buddy
42
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Sign Up Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<style>
.cascading-right {
margin-right: -50px;
}
43
MCA Department, SRMCEM, Lucknow
Transportation Buddy
44
MCA Department, SRMCEM, Lucknow
Transportation Buddy
45
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Booking Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
</head>
<body>
{%include "transportapp/user/user_commonheader.html"%}
<form method="post" action="/pay_book/">
{%csrf_token%}
<div class="container-fluid" style="background-color: #004672;">
<div class="row">
<div class="col-6"><input type="text" style="font: Yantramanav, sans-serif;font-
weight: 800;font-size: 48px;border: 0px solid;background-color:#004672;padding-left:
500px;color: white;" value="{{fare_key.pick_up}}" name="pick">
</div>
<div class="col-1 mt-4" style="background-color: #004672;">
<i class='fas fa-arrow-right' style="font-size: 36px;font-weight: 800;color:
white;"></i>
</div>
<div class="col-4"><input type="text" style="font: Yantramanav, sans-serif;font-
weight: 800;font-size: 48px;border: 0px solid; background-color:#004672;color:
white;margin-left: -50px;" value="{{fare_key.drop}}" name="drop"></div>
</div>
<div class="row">
<div class="col-7">
<label for="distance" style="font-size: 48px;font-weight: 800;padding-left:
650px;color: white;">Distance:-</label>
</div>
<div class="col-5">
<div style="width: 100px;"><input style="font: Yantramanav, sans-serif;font-weight:
800;font-size: 48px;border: 0px solid;background-color:#004672;width: 1110px;color:
white;" value="{{fare_key.distance}}" name="distance"></div>
</div>
</div>
</div>
<!-- <div class="col-10" style="padding-left: 200px;"> -->
<table class="table table-striped">
<thead>
<tr>
<th scope="col" style="font-size: 30px;">Select</th>
<th scope="col"style="font-size: 30px;">Truck Pic</th>
<th scope="col"style="font-size: 30px;">Truck Type</th>
46
MCA Department, SRMCEM, Lucknow
Transportation Buddy
</tr>
</thead>
<tbody>
{% for obj in vehicle_key %}
<tr>
<td style="padding: 50px;"><input type="radio" name="rd" value="{{obj.id}}"></td>
<td><img src="/media/{{obj.photo}}" height="100px" width="150px"></td>
<td style="font-size: 25px; font-family:'Times New Roman', Times, serif;padding-top:
50px;">{{obj.truck_type}}</td>
<input type="hidden" name="txt{{obj.id}}" value="{{obj.truck_type}}">
</tr>
{% endfor %}
</tbody>
</table>
<select class="form-select" aria-label="Default select example" name="itemtype">
<option selected>Open this select menu</option>
{% for obj1 in type_key %}
<option value="{{obj1.type}}">{{obj1.type}}</option>
{% endfor %}
</select>
<div class="input-group mb-3 mt-3">
<div class="form-floating ">
<input type="date" class="form-control" id="Usercity" placeholder="Booking Date"
name="user_city">
<label for="Usercity">Booking Date</label>
</div>
</div>
</div>
<div class="mx-auto mt-4 mb-4" style="padding-left: 650px;">
<button class="btn btn-primary" type="submit">Book Now</button>
</div>
</form>
<script type="text/javascript">
window.onload=function(){//from ww w . j a va2s. c o m
var today = new Date().toISOString().split('T')[0];
document.getElementsByName("user_city")[0].setAttribute('min', today);
}
</script>
{%include "transportapp/html/common_footer.html"%}
{%include "transportapp/html/common_js.html"%}
</body>
</html>
47
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Confirmation Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
</head>
<body>
{%include "transportapp/user/user_commonheader.html"%}
<div style="font-size: 48px; text-align: center;background-color: aquamarine;font-
weight: 800;"><p>{{book_key.pick}} <i class='fas fa-arrow-right' style='font-
size:36px'></i> {{book_key.drop}}</p>
<div><p>Distance:-{{book_key.distance}}</p>
</div>
</div>
<div style="padding-left: 300px;">
<div class="col-9" style="background-color: #004672;height: 60px;color: white;">
<p style="font-size: 20px; text-align: center;font-weight: 700;" class="mt-
2">Your Booking is almost done</p>
</div>
</div>
<div class="row mt-4" style="padding-left: 400px;">
<div class="col-6">
<h5>Name</h5><p>{{name_key.fname}}</p>
</div>
<div class="col-4">
<h5>Good Type</h5><p>{{book_key.item_type}}</p>
</div>
</div>
<div>
<p style="font-size: 20px;text-align: center;"><b>Truck Type:-
</b>{{book_key.truck_type}}</p>
</div>
<div>
<p style="font-size: 20px;text-align: center;"><b>Estimated Fare:- <i class='fas fa-
rupee-sign'></i></b>{{min_key}}-{{max_key}}</p>
</div>
48
MCA Department, SRMCEM, Lucknow
Transportation Buddy
<div class="accordion-item">
<h2 class="accordion-header" id="headingOne">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-
bs-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
Terms And Conditions*
</button>
</h2>
<div id="collapseOne" class="accordion-collapse collapse" aria-
labelledby="headingOne" data-bs-parent="#accordionExample">
<div class="accordion-body">
<strong>If you cancle booking after truck reached to your pickup location then
you will give fuel charges + 20% of your Estimated value</strong>
</div>
</div>
</div>
</div>
<br><br><br>
{%include "transportapp/html/common_footer.html"%}
{%include "transportapp/html/common_js.html"%}
</body>
</html>
49
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Compose Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
</head>
<body>
{%include "transportapp/user/user_commonheader.html"%}
<div class="row">
<div class="col">
<form method="post" class="needs-validation" action="/c_message/" novalidate>
{%csrf_token%}
<div style="padding-left: 50px;">
<h2 style="text-align: center;font-family: 'Times New Roman', Times, serif;font-
size:40px ;text-align: center; font-weight: 800;">Compose Your Message</h2><hr>
<div class="input-group mb-3 mt-2">
<span class="input-group-text"><i class="far fa-address-book"></i></span>
<div class="form-floating ">
<input type="text" class="form-control" id="Username" placeholder="Enter
username" name="r_id" required>
<label for="Username">Reciever Id</label>
<div class="invalid-feedback">
Please enter your Reciever Id.
</div>
</div>
</div>
<div class="input-group mb-3 mt-2">
<span class="input-group-text"><i class="fas fa-edit"></i></span>
<div class="form-floating ">
<input type="text" class="form-control" id="Username" placeholder="Enter
username" name="sub" required>
<label for="Username">Subject</label>
<div class="invalid-feedback">
Please enter your Subject.
</div>
</div>
</div>
<div class="input-group mb-3 mt-2">
<span class="input-group-text"><i class="far fa-envelope"></i></span>
<div class="form-floating ">
<input type="text" class="form-control" id="Username" placeholder="Enter
username" name="message" required>
50
MCA Department, SRMCEM, Lucknow
Transportation Buddy
<label for="Username">Message</label>
<div class="invalid-feedback">
Please enter your Message.
</div>
</div>
</div>
<div class="text-center mx-5 mt-3" style="text-align: center;">
<button class="btn" style="height:50px;width:100px ; background-color: #EE7E1A;
color: white; font-weight: 700;">Submit</button>
</div>
</div>
</form>
</div>
<div class="col">
<img src="{%static 'transportapp/images/compose.jpg'%}" alt="compose"
height="500px" width="730px" style="border: 3px solid;">
</div>
</div>
<script>
{% if messages %}
{% for m in messages %}
swal("{{m}}");
{%endfor%}
{%endif%}
</script>
{%include "transportapp/html/common_footer2.html"%}
{%include "transportapp/html/common_js.html"%}
<script src="{% static 'transportapp/js/validation.js'%}"> </script>
</body>
</html>
51
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Inbox Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
</head>
<body>
{%include "transportapp/user/user_commonheader.html"%}
<form method="post" action="/delete_inbox/">
{%csrf_token%}
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Select</th>
<th scope="col">Sender Id</th>
<th scope="col">Subject</th>
<th scope="col">Date</th>
<th scope="col">Message</th>
</tr>
</thead>
<tbody>
{%for m in msg_key%}
<tr>
<td><input type="checkbox" name="checkmsg" value="{{m.id}}"></td>
<td>{{m.sender_id}}</td>
<td>{{m.subject}}</td>
<td>{{m.date}}</td>
<td>{{m.message}}</td>
</tr>
{%endfor%}
</tbody>
</table>
<div class="col-md-12 text-center">
<button type="submit" class="btn btn-primary">Delete</button>
</div>
</form>
{%include "transportapp/html/common_footer2.html"%}
{%include "transportapp/html/common_js.html"%}
</body>
</html>
52
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Sent Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
</head>
<body>
{%include "transportapp/user/user_commonheader.html"%}
<form method="post" action="/delete_sent/">
{%csrf_token%}
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Select</th>
<th scope="col">Receiver Id</th>
<th scope="col">Subject</th>
<th scope="col">Date</th>
<th scope="col">Message</th>
</tr>
</thead>
<tbody>
{%for m in msg_key%}
<tr>
<td><input type="checkbox" name="checkmsg" value="{{m.id}}"></td>
<td>{{m.receiver_id}}</td>
<td>{{m.subject}}</td>
<td>{{m.date}}</td>
<td>{{m.message}}</td>
</tr>
{%endfor%}
</tbody>
</table>
<div class="text-center">
<button type="submit" class="btn btn-primary">Delete</button>
</div>
</form>
{%include "transportapp/html/common_footer2.html"%}
{%include "transportapp/html/common_js.html"%}
</body>
</html>
53
MCA Department, SRMCEM, Lucknow
Transportation Buddy
My Order Page
<!DOCTYPE html>
{%load static%}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{%include "transportapp/html/common_css.html"%}
</head>
<body>
{%include "transportapp/user/user_commonheader.html"%}
<table class="table table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Your Id</th>
<th scope="col">Pick Location</th>
<th scope="col">Drop Location</th>
<th scope="col">Distance</th>
<th scope="col">Truck Booking Date</th>
<th scope="col">Booking Date</th>
<th scope="col">Amount</th>
<th scope="col">Booking Status</th>
</tr>
</thead>
<tbody>
{%for m in order_key%}
<tr>
<td><i class="fa fa-circle" style="font-size: 10px;"></i></td>
<td>{{m.user_id}}</td>
<td>{{m.pick}}</td>
<td>{{m.drop}}</td>
<td>{{m.distance}}</td>
<td>{{m.delivery_date}}</td>
<td>{{m.date}}</td>
<td>{{m.paid_amount}}</td>
<td>{{m.admin_confirm}}</td>
</tr>
{%endfor%}
</tbody>
</table>
{%include "transportapp/html/common_footer2.html"%}
{%include "transportapp/html/common_js.html"%}
</body>
</html>
54
MCA Department, SRMCEM, Lucknow
Transportation Buddy
{%load static%}
<title>Move Masters</title>
<style>
.nav-link{
color: black !important;
font:Poppins, sans-serif;
font-weight: 700;
font-size: 20px;
}
.dropdown-item{
color: black !important;
font-size: 20px;
}
a:hover{
color: #EE7E1A !important;;
}
</style>
<nav class="navbar navbar-expand-lg sticky-top" style="background-color: white;">
<div class="container-fluid">
56
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Footer 1: -
<footer class="bg-light text-center text-lg-start">
<!-- Copyright -->
<div class="text-center p-3" style="background-color: rgba(8, 192, 238, 0.2);">
<p style="text-align: center;">© 2023 Copyright:Created By Sakshi and Ritesh</p>
</div>
<!-- Copyright -->
</footer>
57
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Footer 2: -
CSS: -
{%load static%}
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dw
wykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/5.9.0/css/all.min.css"
integrity="sha512q3eWabyZPc1XTCmF+8/LuE1ozpg5xxn7iO89yfSOd5/oKvyqLngoN
Gsx8jq92Y8eXJ/IRxQbEC+FGSYxtk2oiw==" crossorigin="anonymous"
referrerpolicy="no-referrer" />
<link rel="icon" href="{%static 'transportapp/images/Logo.png'%}">
JS: -
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0j
lpcV8Qyq46cDfL" crossorigin="anonymous"></script>
58
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Views.py File
from django.shortcuts import render,HttpResponse
from .models import
Contact,FeedBack_Rating,customer_signup,check_fare,Scheme_Offers,vehicle_manage,
user_message,Goods_type,Vehicle_booking
from django.contrib import messages
# Create your views here.
def home(request):
offer_list=Scheme_Offers.objects.all()
context={"offer_key":offer_list}
return render(request,'transportapp/html/index.html',context)
def aboutus(request):
return render(request,'transportapp/html/aboutus.html')
def contactus(request):
if request.method=='GET':
return render(request,'transportapp/html/contactus.html')
if request.method=='POST':
name=request.POST["user_name"]
email=request.POST["user_email"]
phone=request.POST["user_phone"]
city=request.POST["user_city"]
message=request.POST["user_message"]
contact_obj=Contact(name=name,email=email,phone=phone,city=city,message=message
)
contact_obj.save()
messages.success(request,"Thank you for Contacting Us")
return render(request,'transportapp/html/contactus.html')
def trucktype(request):
return render(request,'transportapp/html/trucktype.html')
def login(request):
if request.method=='GET':
return render(request,'transportapp/user/login.html')
if request.method=='POST':
id=request.POST["u_id"]
password=request.POST["u_pass"]
user_list=customer_signup.objects.filter(email=id,password=password)
if len(user_list)>0:
request.session["session_key"]=id
return render(request,'transportapp/user/user_home.html')
else:
messages.error(request,"Invalid ID and Password.!!")
return render(request,'transportapp/user/login.html')
59
MCA Department, SRMCEM, Lucknow
Transportation Buddy
def signup(request):
if request.method=='GET':
return render(request,'transportapp/user/signup.html')
if request.method=='POST':
fname=request.POST["f_name"]
lname=request.POST["l_name"]
email=request.POST["email"]
phone=request.POST["phone"]
password=request.POST["password"]
signup_obj=customer_signup(fname=fname,lname=lname,email=email,phone=phone,pas
sword=password)
signup_obj.save()
messages.success(request,"You are successfully register")
return render(request,'transportapp/user/signup.html')
def feedback(request):
if request.method=='GET':
return render(request,'transportapp/html/feedback.html')
if request.method=='POST':
name=request.POST["u_name"]
email=request.POST["u_email"]
message=request.POST["u_message"]
rating=request.POST["rating"]
feedback_obj=FeedBack_Rating(name=name,email=email,feedback_text=message,rating
s=rating)
feedback_obj.save()
messages.success(request,"Thank you for your feedback")
return render(request,'transportapp/html/feedback.html')
def faq(request):
return render(request,'transportapp/html/faq.html')
def fare(request):
if request.method=='GET':
return HttpResponse("<h2> Page Cannot be refresh")
if request.method=='POST':
if "session_key" in request.session.keys():
pick=request.POST["pick"]
drop=request.POST["drop"]
distance=request.POST["distance"]
fare_obj=check_fare(pick_up=pick,drop=drop,distance=distance)
fare_obj.save()
vehicle_list=vehicle_manage.objects.all()
fare_object=check_fare.objects.get(id=fare_obj.id)
60
MCA Department, SRMCEM, Lucknow
Transportation Buddy
type_list=Goods_type.objects.all()
context={"vehicle_key":vehicle_list,"fare_key":fare_object,"type_key":type_list}
return render(request,'transportapp/html/booking.html',context)
else:
messages.error(request,"Please do Login first")
return render(request,'transportapp/user/login.html')
def booking(request):
if request.method=='POST':
item_type=request.POST["itemtype"]
id=request.POST["rd"]
truck_type=request.POST["txt"+str(id)]
return render(request,'transportapp/user/pay_book.html')
def review(request):
feed_list=FeedBack_Rating.objects.all()
context={"feed_key":feed_list}
return render(request,'transportapp/html/review.html',context)
def user_logout(request):
del request.session["session_key"]
offer_list=Scheme_Offers.objects.all()
context={"offer_key":offer_list}
return render(request,'transportapp/html/index.html',context)
def user_compose(request):
if request.method =='GET':
return render(request,'transportapp/user/compose_message.html')
if request.method =='POST':
sender_id=request.session["session_key"]
receiver_id=request.POST["r_id"]
subject=request.POST["sub"]
message=request.POST["message"]
com_obj=user_message(sender_id=sender_id,receiver_id=receiver_id,subject=subject,m
essage=message)
com_obj.save()
messages.success(request,"Your message is compose successfully")
return render(request,'transportapp/user/compose_message.html')
def inbox(request):
receiver_id=request.session["session_key"]
message_list=user_message.objects.filter(receiver_id=receiver_id,receiver_status="False
")
context={"msg_key":message_list}
61
MCA Department, SRMCEM, Lucknow
Transportation Buddy
return render(request,'transportapp/user/user_inbox.html',context)
def sent(request):
sender_id=request.session["session_key"]
message_list=user_message.objects.filter(sender_id=sender_id,sender_status="False")
context={"msg_key":message_list}
return render(request,'transportapp/user/user_sent.html',context)
def delete_inbox(request):
receiver_id=request.session["session_key"]
msgid_list=request.POST.getlist("checkmsg")
for m_id in msgid_list:
msg_obj=user_message.objects.get(id=m_id)
msg_obj.receiver_status="True"
msg_obj.save()
message_list=user_message.objects.filter(receiver_id=receiver_id,receiver_status="False
")
context={"msg_key":message_list}
return render(request,'transportapp/user/user_inbox.html',context)
def delete_sent(request):
sender_id=request.session["session_key"]
msgid_list=request.POST.getlist("checkmsg")
for m_id in msgid_list:
msg_obj=user_message.objects.get(id=m_id)
msg_obj.sender_status="True"
msg_obj.save()
message_list=user_message.objects.filter(sender_id=sender_id,sender_status="False")
context={"msg_key":message_list}
return render(request,'transportapp/user/user_sent.html',context)
def payment_booking(request):
if request.method=='POST':
user_id=request.session["session_key"]
truck_id=request.POST["rd"]
item_type=request.POST["itemtype"]
book_date=request.POST["user_city"]
truck_type=request.POST["txt"+truck_id]
pick=request.POST["pick"]
drop=request.POST["drop"]
distance=request.POST["distance"]
book_obj=
Vehicle_booking(user_id=user_id,veh_id=truck_id,truck_type=truck_type,pick=pick,dro
p=drop,item_type=item_type,booking_date=book_date,distance=distance)
book_obj.save()
62
MCA Department, SRMCEM, Lucknow
Transportation Buddy
user_obj=customer_signup.objects.get(email=user_id)
max=int(distance)*65
min=int(distance)*60
print(max)
context={"book_key":book_obj,"name_key":user_obj,"max_key":max,"min_key":min}
return render(request,'transportapp/user/pay_book.html',context)
def user_order(request):
user_id=request.session["session_key"]
order_list=Vehicle_booking.objects.filter(user_id=user_id).order_by('-id')
context={"order_key":order_list}
return render(request,'transportapp/user/user_order.html',context)
def confirm_order(request):
if request.method=='POST':
user_id=request.session["session_key"]
book_id=request.POST["bkid"]
vb=Vehicle_booking.objects.get(id=book_id,user_id=user_id)
vb.user_confirmation="Confirmed"
vb.save()
order_list=Vehicle_booking.objects.filter(user_id=user_id)
context={"order_key":order_list}
return render(request,'transportapp/user/user_order.html',context)
63
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Models.py File
from django.db import models
from django.utils import timezone
class Contact(models.Model):
name=models.CharField(max_length=40)
email=models.EmailField(max_length=50)
phone=models.CharField(max_length=10)
city=models.CharField(max_length=30)
message=models.TextField()
date=models.DateField(default=timezone.now)
def __str__(self):
return self.name
class Scheme_Offers(models.Model):
contents=models.CharField(max_length=45)
date=models.DateField(default=timezone.now)
def __str__(self):
return self.contents
class FeedBack_Rating(models.Model):
name=models.CharField(max_length=45)
email=models.EmailField(max_length=45)
feedback_text=models.TextField()
ratings=models.CharField(max_length=6)
date=models.DateField(default=timezone.now)
def __str__(self):
return self.name
gender=[
("M","Male"),
("F","Female"),
]
class Employee(models.Model):
name=models.CharField(max_length=45)
email=models.EmailField(max_length=45)
phone=models.CharField(max_length=10)
designation=models.CharField(max_length=20)
experience=models.CharField(max_length=10)
gender=models.CharField(max_length=6,choices=gender)
employee_pic=models.FileField(max_length=200,upload_to="transportapp/employee_pi
c",default="")
64
MCA Department, SRMCEM, Lucknow
Transportation Buddy
def __str__(self):
return self.name
class vehicle_manage(models.Model):
truck_type=models.CharField(max_length=50)
truck_size=models.CharField(max_length=40)
truck_capacity=models.CharField(max_length=40)
truck_weight=models.CharField(max_length=30)
photo=models.FileField(max_length=200,upload_to="transportapp/truck_pic",default=""
)
def __str__(self):
return self.truck_type
class customer_signup(models.Model):
fname=models.CharField(max_length=30)
lname=models.CharField(max_length=30)
email=models.EmailField(max_length=60)
phone=models.CharField(max_length=10)
password=models.CharField(max_length=20)
date=models.DateField(default=timezone.now)
def __str__(self):
return self.fname
class check_fare(models.Model):
pick_up=models.CharField(max_length=100)
drop=models.CharField(max_length=100)
distance=models.CharField(max_length=5)
date=models.DateField(default=timezone.now)
def __str__(self):
return self.pick_up
class user_message(models.Model):
sender_id=models.CharField(max_length=40)
receiver_id=models.CharField(max_length=40)
subject=models.CharField(max_length=40)
message=models.CharField(max_length=100)
sender_status=models.CharField(max_length=40,default="False")
receiver_status=models.CharField(max_length=40,default="False")
date=models.DateField(default=timezone.now)
def __str__(self):
return self.sender_id
class Goods_type(models.Model):
type=models.CharField(max_length=50)
def __str__(self):
65
MCA Department, SRMCEM, Lucknow
Transportation Buddy
return self.type
conformation=[
("Apporved","Apporved"),
("Pending","Pending"),
("Rejected","Rejected")
]
class Vehicle_booking(models.Model):
user_id=models.CharField(max_length=40,null=False)
veh_id=models.CharField(max_length=5)
driver_id=models.CharField(max_length=40)
truck_type=models.CharField(max_length=50,null=False)
pick=models.CharField(max_length=200)
drop=models.CharField(max_length=200)
distance=models.CharField(max_length=5)
delivery_date=models.CharField(max_length=10)
item_type=models.CharField(max_length=60)
booking_date=models.CharField(max_length=10)
date=models.DateField(default=timezone.now)
paid_amount=models.CharField(max_length=30)
user_confirmation=models.CharField(max_length=30,default="Not Confirmed")
admin_confirm=models.CharField(max_length=10,choices=conformation,default="Pendi
ng")
booking_status=models.BooleanField(default=False)
def __str__(self):
return self.user_id
66
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Admin Panel
from django.contrib import admin
from .models import
Contact,FeedBack_Rating,Scheme_Offers,Employee,vehicle_manage,customer_signup,c
heck_fare,Goods_type,user_message,Vehicle_booking
class Admin_contact(admin.ModelAdmin):
list_display=('name','email','phone','city','message','date')
list_filter=['date']
class Admin_feedback(admin.ModelAdmin):
list_display=('name','email','feedback_text','ratings','date')
search_fields=('ratings',)
class Admin_employee(admin.ModelAdmin):
list_display=('name','email','phone','designation','experience','gender')
search_fields=('designation','experience')
class Admin_vehicle(admin.ModelAdmin):
list_display=('truck_type','truck_size','truck_capacity','truck_weight')
list_filter=['truck_type','truck_weight']
class Admin_signup(admin.ModelAdmin):
list_display=('fname','lname','email','phone','password')
class Admin_message(admin.ModelAdmin):
list_display=('sender_id','receiver_id','subject','message','sender_status','receiver_status','d
ate')
class Admin_fare(admin.ModelAdmin):
list_display=('pick_up','drop','distance','date')
search_fields=('pick_up',"drop")
class Admin_book(admin.ModelAdmin):
list_display=('user_id','pick','drop','distance','booking_date','user_confirmation','date')
# Register your models here.
admin.site.register(Contact,Admin_contact)
admin.site.register(Scheme_Offers)
admin.site.register(FeedBack_Rating,Admin_feedback)
admin.site.register(Employee,Admin_employee)
admin.site.register(vehicle_manage,Admin_vehicle)
admin.site.register(customer_signup,Admin_signup)
admin.site.register(check_fare,Admin_fare)
admin.site.register(Vehicle_booking,Admin_book)
admin.site.register(Goods_type)
admin.site.register(user_message,Admin_message)
67
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Urls
from django.urls import path
from . import views
urlpatterns=[
path("",views.home,name='home'),
path("About_us/",views.aboutus,name='aboutus'),
path("Contact_us/",views.contactus,name='contactus'),
path("Truck_type/",views.trucktype,name='trucktype'),
path("Login/",views.login,name='login'),
path("Sign_up/",views.signup,name='signup'),
path("Feedback/",views.feedback,name='feedback'),
path("FAQ/",views.faq,name='faq'),
path("fare/",views.fare,name='fare'),
path("booking/",views.booking,name='booking'),
path("Review/",views.review,name="review"),
path("c_message/",views.user_compose,name="message"),
path("user_logout/",views.user_logout,name="user_logout"),
path("inbox/",views.inbox,name="inbox"),
path("sent/",views.sent,name="sent"),
path("delete_inbox/",views.delete_inbox,name="delete_inbox"),
path("delete_sent/",views.delete_sent,name="delete_inbox"),
path("pay_book/",views.payment_booking,name="pay_book"),
path("Myorder/",views.user_order,name="order"),
path("confirm_order/",views.confirm_order,name="corder"),
]
68
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Screen Shots
69
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Home Page
70
MCA Department, SRMCEM, Lucknow
Transportation Buddy
About Us Page
71
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Contact Us Page
72
MCA Department, SRMCEM, Lucknow
Transportation Buddy
73
MCA Department, SRMCEM, Lucknow
Transportation Buddy
FAQ Page
74
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Feedback Page
75
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Review Page
76
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Login Page
77
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Sign Up Page
78
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Booking Page
79
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Confirmation Page
80
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Compose Page
81
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Inbox Page
82
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Sent Page
83
MCA Department, SRMCEM, Lucknow
Transportation Buddy
My Order Page
84
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Admin Panel
85
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Database Tables
86
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Contacts Table
87
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Customer Sign Up
88
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Employee table
89
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Feedback table
90
MCA Department, SRMCEM, Lucknow
Transportation Buddy
List of Goods
91
MCA Department, SRMCEM, Lucknow
Transportation Buddy
92
MCA Department, SRMCEM, Lucknow
Transportation Buddy
93
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Vehicle Table
94
MCA Department, SRMCEM, Lucknow
Transportation Buddy
• While Transportation Buddy websites offer many benefits, there are also some
limitations that should be considered. These limitations include: Technical
problems such as website crashes, slow loading times, or errors during the
booking process can cause frustration for users and hinder the experience.
• Users may not be able to fully inspect the vehicle before booking, leading to
uncertainty about its condition or potential issues that could arise during the rental
period.
• The accuracy of information and reviews provided by other users may not always
be reliable, as users may have different expectations or experiences.
• This portal can be integrated with mobile application for the best outcome. Real
time talk with video conferencing with drivers can be added to make it more
secure.
95
MCA Department, SRMCEM, Lucknow
Transportation Buddy
Conclusion
The review of logistics system in a broad sense might help to integrate the advantages
from different application cases to overcome their current demerits. Review of transport
systems provides a clear notion on transport applications in logistics activities.
Development of logistics will be still vigorous in the following decades and the logistics
concepts might be applied in more fields.
96
MCA Department, SRMCEM, Lucknow
Transportation Buddy
References
Websites: -
• https://getbootstrap.com
• https://www.w3schools.com/bootstrap
• https://mdbootstrap.com
• https://cdnjs.com
• https://www.python.org
• https://www.djangoproject.com
97
MCA Department, SRMCEM, Lucknow