WRITEUP FOR ASSIGNMENT 4:--> https://drive.google.com/file/d/1lLgN7pTO_a6krywIUAJEYwMZZ766K1k0/view?usp=sharing (The file size of greater than 25mb could not be uploaded to github, so the drive link)
First, change the working directory to transport-management-system after cloning this repository.
git clone https://github.com/ayushmodi12/transport-management-system.git
Please run the following command with the cloned repository as the current working directory to install all the required modules and packages.
pip install -r requirements.txt
Please run the setup.py to instantiate the database and launch the web server.
Make sure that you don't have the database before running setup.py. Else directly launch the web server by executing tms.py.
- Go to the hosts file. It can be typically found here
C:\Windows\System32\drivers\etc\hosts. - Add the following translation
127.0.0.1 tms.iitgn.ac.inif the client and server are hosted on the same machine. Else add the public of the server machine. After that, your hosts file should look like this.

Now tms.iitgn.ac.in is mapped to 127.0.0.1, i.e. the local host and now we can access it like an actual website. So if we type http://tms.iitgn.ac.in:5000/ on our browser, we will be able to access the webpage!
We can also create our own personal local network, and set up the server in one computer, and access the webpage from another computer. This can be shown as a demo to the TA when requested.
Access the website by typing http://tms.iitgn.ac.in:5000/ on the browser.
Access the website by typing http://127.0.0.1:5000/ on the browser.
Before inserting, viewing the table on workbench:
Now, inserting a new value in the table:
New value inserted can be seen on workbench:
Showing the Updated and before states of the table on the website:
After (in webApp)
Before (in webApp):

Now in Admin Terminal for different query:

We insert entries into the booking table upon successful booking.

We can also execute custom insert query in the admin terminal. Following is the result.

Before Deleting, viewing the table on workbench:
Now, deleting the row where capacity = 20:
We can see on workbench, that the row having capacity = 20 is deleted:
Showing the Updated and before states of the table on the website:
After (in webApp)
Before (in webApp):

Now in Admin Terminal for different query:

We can also execute custom delete query in the admin terminal. Following is the result.

Before updating, viewing the table on workbench:
Now, updating the capacity to 60 in the row where location="Hostel Parking Area": NOTE: Only those input fields are to be filled for which we want to update the values, if the field is left empty, the value for that column will not be updated.
This updated row can be seen in the table on workbench:
Showing the Updated and before states of the table on the website:
After (in webApp)
Before (in webApp):

Now in Admin Terminal for different query:

We can also execute custom update query in the admin terminal. Following is the result.

Before renaming, viewing the current table on workbench:
Now, updating the table name to parking_space_new: NOTE: Only those input fields are to be filled for which we want to rename, for rest others, leave the input field empty:
As we can see on workbench, the table name has been updated to parking_space_new:
Showing the Updated and before states of the table on website:
After (updating table name):
Before (updating table name):

Now, renaming the column location to location_2:

We can see in the workbench, the table name of location has been changed:
Showing the Updated and before states of the table on the website:
After (updating column name):
Before (updating column name):

Now, the WHERE clause has already been used in the above operations where we have performed UPDATE and DELETE.
The input field “Condition” in UPDATE and DELETE Operations takes the WHERE Clause as input and accordingly performs the operations. The screenshots for the operations have thus already been shown in the above sections. Below is the snippet of the code for the /update-values api, that creates the sql query for UPDATE operation using WHERE Clause:
As we have already added screenshots above in UPDATE and DELETE, which also contain the WHERE Clause, we are not adding screenshots here.
We can also execute custom where where clause in the admin terminal. Following are the results.

- Mithil Pechimuthu
- Ayush Modi
- Shreesh Agarwal
- Anushk Bhana
- Vedant Kumbhar


















