Capstone Project Execution(Report)
Capstone Project Execution(Report)
2021-22
SEMESTER - VI
Project Report of
Submitted by
1
DEPARTMENT OF COMPUTER ENGINEERING
GOVERNMENT POLYTECHNIC AWASARI (KHURD)
SEMESTER-VI
2021-22
CERTIFICATE
This is to certify that the seminar entitled “ONLINE VEHICLE PARKING
MANAGEMENT SYSTEM” has been carried out by Mitali Devade(21CO312), Shital
Khairnar (21CO331) and Vaishnavi Wakchaure(21CO361) under my guidance in partial
fulfillment of the requirements for the Diploma in Computer Engineering of MSBTE, during
the academic year 2021-2022.
2
ACKNOWLEDGEMENT
I have great pleasure and sense of satisfaction in presenting this project report on “Online
Vehicle Parking Management System” as part of the curriculum of Diploma in Computer
Engineering. Being novice in the field of designing and structuring in this project, it could have
been extremely difficult for me to complete this project on my own. I am very fortunate to be
guided by people with vast and resourceful experience in their respective field of work.
Devade Mitali
Khairnar Shital
Wakchaure Vaishnavi
3
ABSTRACT
4
TABLE OF CONTENTS
Sr.No Topic
Page No
1 Chapter 1
1.1 Introduction
1.2 Problem Statement
1.3 Proposed System
1.4 Objective of System 8
2 Chapter 2
2.1 Literature Survey
10
2.2 Course
Outcomes(COs)
3 Chapter 3
3.1 Methodology 11
3.2 Action Plan
4 Chapter 4
4.1 User
4.1.1 Sign In
4.2.2 Login
4.3.3 Home 12
4.4.4 Reserve
4.5.5 Checkout
4.6.6 Print Ticket
4.7.7 All Ticket
4.8.8 Logout
5
4.2 Admin
4.2.1 Login
4.2.2 Reservation
4.2.3 Add Parking Zone
4.2.4 Delete Parking Zone
4.2.5 Parking Zone
4.2.6 Logout
5 Chapter 5
6
6.2 Admin Test Cases
6.2.1 Login
6.2.2 Add Parking Zone
6.2.3 Parking Zone
6.2.5 Reservation
7 Chapter 7
24
7.1 Project Code
8 Chapter 8
8.1 Project Output 31
9 Chapter 9
9.1 Future Enhancement 39
9.2 Conclusion
9.3 Reference
7
CHAPTER 1
1.1 Introduction
Now a days increasing number of cars and vehicles the parking is a big problem. We
can see when we are going in market for purchasing something, there are big issue is parking
our vehicles. We are observe this problem and that’s why we are implementing this web site
“Online Parking Management System”. In this website we allocated parking slots in specific
area. That is from admin side we allocated parking slot and from user side you can book this
slot. If you have to book this slot you can register to our website and you can feel the correct
information that you can see webpage/ on your screen. If you feel correct information then
parking slot allocate for you.
When you retrieve your vehicle then you have to paid some specific charges for parking.
When you paid parking charges then generate a payment slip on your screen and slip you can
download. Nowadays importance is given to the wireless technology and effective system.
Computers and technology have become part of our life for accessing almost everything we
basically do. Life now is full of indispensable technological advancement and in this
technological era it is very difficult for any organization to survive without technology. The
World Wide Web contributes enormously to the creation of an ever-increasing global
information database. It could also be used as a system to share information within an
enterprise. Online Parking Management System help to find place for parking to overcome
the difficulty of parking of hundreds and thousands of user and searching the eligible place
for parking, based on various locations. It helps in effective and efficient searching of the
place. User will create their accounts and can login. Based on the location from user the admin
will be allowed to proceed further. The user will then enter their details which will be
approved by administrator. Once approved, the user will get notified on every updates .
8
1.3 Proposed System
This website provide us for online parking booking system for the vehicles. This website help
us for parking our vehicle at any market or any place. In this website we had several
advantages like It has user friendly interface, Fast access to database, Slot booking facility,
Slot price column, Parking city column, Parking location column, Quick transaction, Payment
receipt facility etc.
9
CHAPTER 2
2.1 Literature Review
Online Parking Management system for managing incoming and outgoing vehicles in a
particular area parking. It is very easy for admin to retrieve the data if the vehicle has been
visited through he can get that data. Now a days in many public places such a any bajar or
any public palaces there are very big problem of parking. This website provides us booking
online parking place at app
The objective of this project is to build Vehicle Parking Management System enables
the time management and control of vehicles using number plate recognition. The System
that will track entry and exit data of vehicles and also duration of parking. Each and every
process in the existing system is carried out manually. The searching of places for parking
for hours will be very time consuming for people. It becomes more difficult when number
of vehicles are increasing day by day. There are other limitations of existing system. In
Online Parking Management System all the task is done by human interventions.
Therefore, there is maximum chance of errors. Updating certain information is difficult
and ambiguous which may lead to data redundancy due to the chances of duplication of
information.
10
CHAPTER 3
3.1 Methodology
We have planned the micro-project of “Online Vehicle Management System”
under the guidance of subject teacher. Then our team collected information related to from
syllabus book as well reference book. We took the reference from other website that are
available on internet. We studied about the different component.
After the studied of one week, we designed and Then we have finalized the project and
prepared report on this micro-project.
Shital
Khairnar
4 Checking of User view and Admin view 13/04/2022 21/04/2022
by mentor
Vaishnavi
6 Testing of Admin View of project. 05/05/2022 15/05/2022
Wakchaure
11
CHAPTER 4
4.1 User
4.1.1 Sign in
• When user visited this website for first time he has to create his account.
• For creating account we have to filled some information.
• The first filled is Username. For username we have limit for 150 characters. We can
use characters, symbols, and digits for Username.
• The next field is password. There are also some limit for password.
• We have to enter at least 8 characters for password.
• Password may contain some symbol, digits, and characters. When we enter password,
password should unique it not similar to your personal information.
• Next field is confirmation of password we have to enter same password in this field.
• The last on is create account button. After filled all information just click on create
account button.
4.1.2 Login
• The login module , when we login we have enter username and password.
• For username we have entered same user name that we entered for creating account.
• For password same like username we have entered same password which we entered for
creating account.
• After filled all information just click on Login button.
• Also in login module there are also sign in option.
• From this sign in option we can also sign in for this website.
4.1.3 Home
• After login home page will displayed. Home page is the main page of our app.
• Name of our homepage is “My Parking Spot”.
• On the homepage we are provided 2 modules first is ”Reserve” and second is “Checkout”.
• On the home page we are displayed 1 table related to parking zones.
• In that table we are displayed four filled parking zone, location, vacant slot. And price.
• At the top of homepage we are provided helpline number and also email id
• And also we are provided one side bar. In that side bar we are mentioned total 7 modules.
• Home, Account, Print Ticket, All Ticket, Reserve Parking ,Checkout Parking and Logout.
12
4.1.4 Reserve
4.1.5 Checkout
• When user checkout and retrieve their vehicle then receipt will generated.
• In this receipt we mentioned fields are at the top of receipt we generate a ticket code, then
parking status, phone number, start date, finish date, Parking zone, Plate number & Price.
• The ticket will generate in pdf format.
• We can download that pdf click on download button.
• Also we can print it into a hard copy.
4.1.8 Logout
• When user have leave our side then we will provide a module logout
• Just click on logout button user can leave from app.
13
4.2 Admin
4.2.1 Login
• The login module , when we login we have enter username and password.
• For username we have entered same user name that we entered for creating account.
• For password same like username we have entered same password which we entered for
creating account.
• After filled all information just click on Login button.
• Also in login module there are also sign in option.
• From this sign in option we can also sign in for this app.
4.2.2 ogout
• When user have leave from admin site then we will provide a module logout
• Just click on logout button user can leave from admin site.
4.2.3 Reservation
14
CHAPTER 5
15
5.3 Admin Activity Diagram
16
5.5 User Sign In Activity Diagram
17
5.8 Data Flow Diagram
18
5.8.3 DFD Level 2
19
CHAPTER 6
6.2.1 Login
6.2.3 Sign In
6.2.5 Logout
20
6.2.2 Reserve
6.2.4 Checkout
21
6.2 Admin Test Cases
6.2.1 Login
22
TC_7 Check the Enter the The valid The valid PASS
address address of address of address of
field parking zone parking parking
zone should zone
be expected expected
TC_8 Check the Enter the price The valid The valid PASS
price zone of per vehicle price of per price of
parking vehicle per vehicle
should be expected
expected
6.2.2 Reservation
23
CHAPTER 7
• views.py
import random
import string
def create_ticket_code():
return ''.join(random.choices(string.ascii_lowercase + string.digits, k=6))
class ReservationView(View):
def get(self, request):
try:
user_reservation = Reservation.objects.get(customer=request.user,
checked_out=False)
if user_reservation:
messages.warning(self.request, 'Please Check Out Your Previous Reservation')
return redirect('index')
except ObjectDoesNotExist:
pass
reservation = ReservationForm()
except ObjectDoesNotExist:
24
pass
reservation_form = ReservationForm(data=request.POST)
if reservation_form.is_valid():
start_date = reservation_form.cleaned_data['start_date']
finish_date = reservation_form.cleaned_data['finish_date']
parking_zone = reservation_form.cleaned_data['parking_zone']
plate_number = reservation_form.cleaned_data['plate_number']
parkingzone = Parking_Zone.objects.get(name=parking_zone)
if parkingzone.vacant_slots == 0:
messages.warning(self.request, 'Parking Zone Full!')
return redirect('index')
reservation = reservation_form.save(commit=False)
reservation.customer = request.user
reservation.parking_zone = parking_zone
reservation.ticket_code = create_ticket_code()
reservation.save()
#parkingzone = Parking_Zone.objects.get(name=parking_zone)
parkingzone.occupied_slots += 1
parkingzone.save()
vacantslots = int(parkingzone.num_of_slots) - int(parkingzone.occupied_slots)
parkingzone.vacant_slots = vacantslots
parkingzone.save()
messages.info(request, 'Successfully Booked')
return redirect('index')
class Ticket_Pdf(View):
today = timezone.now()
reservation = Reservation.objects.filter(Q(customer=request.user, checked_out=False) |
Q(customer=request.user, checked_out=True))
if reservation:
params = {
'today': today,
'reservation': reservation.first(),
'request': request
}
return Render.render('parking_zones/ticket.html', params)
else:
messages.warning(self.request, f'No Parking reservation exists for {self.request.user}')
return redirect('index')
class Display_Tickets(View):
def get(self, request):
25
today = timezone.now()
reservations = Reservation.objects.filter(customer=self.request.user)
if reservations:
context = {
'today': today,
'reservations': reservations,
'request': request
}
return render(request, 'parking_zones/all_tickets.html', context)
else:
messages.warning(self.request, f'No Parking reservation exists for {self.request.user}')
return redirect('index')
@login_required
def check_out(request):
try:
reservation = Reservation.objects.get(customer=request.user, checked_out=False)
if reservation:
reservation.checked_out = True
reservation.save()
parking_zone_name = reservation.parking_zone.name
parking_zone = Parking_Zone.objects.get(name=parking_zone_name)
parking_zone.occupied_slots -= 1
parking_zone.vacant_slots += 1
parking_zone.save()
messages.info(request, 'Successfully Checked Out')
except ObjectDoesNotExist:
messages.warning(request, f'No Parking reservation exists for {request.user}')
return redirect('index')
• urls.py
urlpatterns = [
path('', include('source.urls')),
path('admin/', admin.site.urls),
path('user/signup/', users_views.signup_view, name='signup'),
path('user/login', users_views.user_login, name='login'),
path('user/logout/', users_views.user_logout, name='logout'),
path('book/', login_required(parkingzoneviews.ReservationView.as_view()), name='book'),
26
path('ticket/', login_required(parkingzoneviews.Ticket_Pdf.as_view()), name='ticket'),
path('all_tickets/', login_required(parkingzoneviews.Display_Tickets.as_view()), name='all-
tickets'),
path('checkout/', parkingzoneviews.check_out, name='checkout')
]
• forms.py
import datetime
from django.forms import ModelForm, DateInput, TextInput, ValidationError
from .models import Reservation
from django.contrib import messages
class ReservationForm(ModelForm):
class Meta:
model = Reservation
exclude = ['ticket_code', 'customer', 'checked_out']
# Validating form fields using widgets
widgets = {
'start_date': DateInput(attrs={'type': 'date'}),
'finish_date': DateInput(attrs={'type': 'date'}),
# 'plate_number': TextInput(attrs={'pattern': '^K[A-Z]{2}[0-9]{3}[A-Z]$', 'title': 'Enter
a valid parking space number'}),
'plate_number': TextInput(),
'phone_number': TextInput(attrs={'pattern': '[0-9]+', 'title': 'Enter digits only '}),
}
return data
• models.py
27
class Parking_Zone(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField(max_length=200, unique=True)
num_of_slots = models.PositiveIntegerField()
occupied_slots = models.PositiveIntegerField(null=True, blank=True, default=0)
vacant_slots = models.PositiveIntegerField(null=True, blank=True, default=0)
address = models.CharField(max_length=200)
price = models.PositiveIntegerField()
def __str__(self):
return self.name
def get_absolute_url(self):
return reverse('parkingzone-detail', kwargs={
'slug': self.slug
})
class Reservation(models.Model):
ticket_code = models.CharField(max_length=6, blank=True, null=True)
customer = models.ForeignKey(User, on_delete=models.CASCADE)
start_date = models.DateField()
finish_date = models.DateField()
parking_zone = models.ForeignKey(Parking_Zone, on_delete=models.CASCADE)
plate_number = models.CharField(max_length=10)
phone_number = models.CharField(max_length=16)
checked_out = models.BooleanField(default=False)
created_on = models.DateTimeField(auto_now_add=True)
class Meta:
ordering = ['-created_on']
def __str__(self):
return f'Reservation for vehicle: {self.plate_number}'
• render.py
class Render:
@staticmethod
def render(path: str, params: dict):
template = get_template(path)
html = template.render(params)
response = BytesIO()
28
pdf = pisa.pisaDocument(BytesIO(html.encode("UTF-8")), response)
if not pdf.err:
return HttpResponse(response.getvalue(), content_type='application/pdf')
else:
return HttpResponse("Error Rendering PDF", status=400)
• admin.py
class Parking_ZoneAdmin(admin.ModelAdmin):
list_display = ('name', 'num_of_slots','occupied_slots', 'vacant_slots', 'address', 'price',)
list_filter = ('address',)
prepopulated_fields = {'slug': ('name',)}
search_fields = ('name',)
class Reservation_Admin(admin.ModelAdmin):
list_display = ('ticket_code', 'customer', 'start_date', 'finish_date', 'parking_zone',
'plate_number', 'phone_number', 'checked_out', 'created_on')
list_filter = ('start_date', 'finish_date', 'parking_zone', 'checked_out')
search_fields = ('ticket_code', 'plate_number')
admin.site.register(Parking_Zone, Parking_ZoneAdmin)
admin.site.register(Reservation, Reservation_Admin)
• views.py
def index(request):
context = {
'all_parking_zones':Parking_Zone.objects.all()
}
return render(request, 'source/index.html', context)
29
}
return render(request, 'source/status.html', context)
• views.py
def signup_view(request):
if request.method == 'POST':
form = UserCreationForm(request.POST)
if form.is_valid():
form.save()
username = form.cleaned_data.get('username')
messages.success(request, f'Succesfully Created user {username}. You can now login')
return redirect('login')
else:
form = UserCreationForm()
context = {
'form' : form
}
return render(request, 'users/signup.html', context)
def user_login(request):
form = AuthenticationForm()
if request.method == 'POST':
username = request.POST['username']
password = request.POST['password']
user = authenticate(username=username, password=password)
if user is not None:
login(request, user)
if user.is_authenticated:
messages.success(request, f'User {username} Successfully Logged in')
return redirect('index')
else:
messages.warning(request, 'invalid Credentials')
context = {
'form': form
}
return render(request, 'users/login.html', context)
def user_logout(request):
logout(request)
messages.success(request, 'Successfully logged out')
return redirect('login')
30
CHAPTER 8
❖ Sign In
❖ Login
31
❖ Side Bar [ Login Page]
32
❖ Home Page
33
❖ Book Parking
❖ Print Ticket
34
❖ All Print Ticket
35
❖ Nav Bar [ Checkout Parking ]
❖ Admin Panel
36
❖ Parking Zone
37
❖ Delete Parking Zone
❖ Reservation
38
CHAPTER 9
In the current context, increasing the parking capacity would be a challenge due to the
growing scarcity of available urban space, while decreasing the demand will subdue citizens’
mobility experience. In this context, the future of parking will emerge as an ecosystem play.
9.2 Conclusion
9.3 Reference
www.javatpoint.com
www.w3school.com
www.tutorialspoint.com
39