├── requirements.txt ├── static ├── images │ ├── cards.jpg │ ├── Apartment.jpg │ ├── PayRent.jpg │ ├── adminBg.jpg │ ├── rooftop1.jpg │ ├── user_icon.jpg │ ├── admin_icon.jpg │ ├── background.jpg │ ├── TenantReg_img.jpg │ ├── Apartment1 │ │ ├── Hall.jpg │ │ ├── Bedroom.jpg │ │ ├── Kitchen.jpg │ │ └── Diningroom.jpg │ ├── Apartment2 │ │ ├── Hall.jpg │ │ ├── Bedroom.jpg │ │ ├── Kitchen.jpg │ │ └── Diningroom.jpg │ ├── Apartment3 │ │ ├── Hall.jpg │ │ ├── Bedroom.jpg │ │ ├── Kitchen.jpg │ │ └── Diningroom.jpg │ ├── Apartment4 │ │ ├── Hall.jpg │ │ ├── Bedroom.jpg │ │ ├── Kitchen.jpg │ │ └── Diningroom.jpg │ ├── Apartment5 │ │ ├── Hall.jpg │ │ ├── Bedroom.jpg │ │ ├── Kitchen.jpg │ │ └── Diningroom.jpg │ ├── Apartment6 │ │ ├── Hall.jpeg │ │ ├── Bedroom.jpeg │ │ ├── Kitchen.jpg │ │ └── Diningroom.jpeg │ ├── Apartment7 │ │ ├── Hall.jpg │ │ ├── Bedroom.jpg │ │ ├── Kitchen.jpg │ │ └── Diningroom.jpg │ ├── Apartment8 │ │ ├── Hall.jpg │ │ ├── Bedroom.jpg │ │ ├── Kitchen.jpg │ │ └── Diningroom.jpg │ ├── Apartment9 │ │ ├── Hall.jpg │ │ ├── Bedroom.jpg │ │ ├── Kitchen.jpg │ │ └── Diningroom.jpg │ └── paymentSuccessful.png ├── js │ ├── AdminDashScripts.js │ ├── payment.js │ ├── Scripts.js │ ├── search.js │ ├── RegisterScripts.js │ └── welcomeScripts.js └── css │ ├── base.css │ ├── unoccupiedRoomsStyle.css │ ├── TotalUsersStyle.css │ ├── ReceiptStyle.css │ ├── AdminDashStyle.css │ ├── RentApartmentStyle.css │ ├── TenantDashStyle.css │ ├── detailsStyle.css │ ├── AdminLoginStyle.css │ ├── contractStyle.css │ ├── LoginStyle.css │ ├── TenantReportStyle.css │ ├── RegisterStyle.css │ ├── PaymentStyle.css │ ├── ApartmentRoomsStyle.css │ └── welcomeStyle.css ├── database ├── insertion.sql ├── trigger.sql ├── procedure.sql └── creation.sql ├── templates ├── Reciept.html ├── backup.html ├── alreadyTenant.html ├── TenantDashboard.html ├── TenantLogin.html ├── details.html ├── TotalUsers.html ├── RentStatus.html ├── AdminLogin.html ├── base.html ├── AdminDashboard.html ├── RentApartment.html ├── tenantReport.html ├── contract.html ├── Payment.html ├── welcome.html ├── TenantRegister.html └── ApartmentRooms.html ├── README.md └── main.py /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/requirements.txt -------------------------------------------------------------------------------- /static/images/cards.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/cards.jpg -------------------------------------------------------------------------------- /static/images/Apartment.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment.jpg -------------------------------------------------------------------------------- /static/images/PayRent.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/PayRent.jpg -------------------------------------------------------------------------------- /static/images/adminBg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/adminBg.jpg -------------------------------------------------------------------------------- /static/images/rooftop1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/rooftop1.jpg -------------------------------------------------------------------------------- /static/images/user_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/user_icon.jpg -------------------------------------------------------------------------------- /static/images/admin_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/admin_icon.jpg -------------------------------------------------------------------------------- /static/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/background.jpg -------------------------------------------------------------------------------- /static/images/TenantReg_img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/TenantReg_img.jpg -------------------------------------------------------------------------------- /static/images/Apartment1/Hall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment1/Hall.jpg -------------------------------------------------------------------------------- /static/images/Apartment2/Hall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment2/Hall.jpg -------------------------------------------------------------------------------- /static/images/Apartment3/Hall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment3/Hall.jpg -------------------------------------------------------------------------------- /static/images/Apartment4/Hall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment4/Hall.jpg -------------------------------------------------------------------------------- /static/images/Apartment5/Hall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment5/Hall.jpg -------------------------------------------------------------------------------- /static/images/Apartment6/Hall.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment6/Hall.jpeg -------------------------------------------------------------------------------- /static/images/Apartment7/Hall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment7/Hall.jpg -------------------------------------------------------------------------------- /static/images/Apartment8/Hall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment8/Hall.jpg -------------------------------------------------------------------------------- /static/images/Apartment9/Hall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment9/Hall.jpg -------------------------------------------------------------------------------- /static/images/Apartment1/Bedroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment1/Bedroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment1/Kitchen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment1/Kitchen.jpg -------------------------------------------------------------------------------- /static/images/Apartment2/Bedroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment2/Bedroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment2/Kitchen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment2/Kitchen.jpg -------------------------------------------------------------------------------- /static/images/Apartment3/Bedroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment3/Bedroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment3/Kitchen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment3/Kitchen.jpg -------------------------------------------------------------------------------- /static/images/Apartment4/Bedroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment4/Bedroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment4/Kitchen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment4/Kitchen.jpg -------------------------------------------------------------------------------- /static/images/Apartment5/Bedroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment5/Bedroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment5/Kitchen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment5/Kitchen.jpg -------------------------------------------------------------------------------- /static/images/Apartment6/Bedroom.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment6/Bedroom.jpeg -------------------------------------------------------------------------------- /static/images/Apartment6/Kitchen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment6/Kitchen.jpg -------------------------------------------------------------------------------- /static/images/Apartment7/Bedroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment7/Bedroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment7/Kitchen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment7/Kitchen.jpg -------------------------------------------------------------------------------- /static/images/Apartment8/Bedroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment8/Bedroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment8/Kitchen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment8/Kitchen.jpg -------------------------------------------------------------------------------- /static/images/Apartment9/Bedroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment9/Bedroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment9/Kitchen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment9/Kitchen.jpg -------------------------------------------------------------------------------- /static/images/paymentSuccessful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/paymentSuccessful.png -------------------------------------------------------------------------------- /static/images/Apartment1/Diningroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment1/Diningroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment2/Diningroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment2/Diningroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment3/Diningroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment3/Diningroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment4/Diningroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment4/Diningroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment5/Diningroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment5/Diningroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment7/Diningroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment7/Diningroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment8/Diningroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment8/Diningroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment9/Diningroom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment9/Diningroom.jpg -------------------------------------------------------------------------------- /static/images/Apartment6/Diningroom.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ralweena/Apartment-Rental-Management-System/HEAD/static/images/Apartment6/Diningroom.jpeg -------------------------------------------------------------------------------- /static/js/AdminDashScripts.js: -------------------------------------------------------------------------------- 1 | var checklist = document.getElementById("checklist"); 2 | var items = checklist.querySelectorAll("li"); 3 | 4 | for(var i=1; i<(items.length-1); i++) { 5 | items[i].addEventListener("click", onClick); 6 | } 7 | 8 | function onClick() { 9 | for(var i=1; i<(items.length-1); i++) { 10 | items[i].className= "menu"; 11 | } 12 | if(this.className == "menu") { 13 | this.className = "hidemenu"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /database/insertion.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO APARTMENT_BLOCK VALUES(1,'BLOCK-1','BANGALORE'); 2 | INSERT INTO APARTMENT_BLOCK VALUES(2,'BLOCK-2','BANGALORE'); 3 | INSERT INTO APARTMENT_BLOCK VALUES(3,'BLOCK-3','BANGALORE'); 4 | INSERT INTO APARTMENT_BLOCK VALUES(4,'BLOCK-4','BANGALORE'); 5 | INSERT INTO APARTMENT_BLOCK VALUES(5,'BLOCK-5','BANGALORE'); 6 | INSERT INTO APARTMENT_BLOCK VALUES(6,'BLOCK-6','BANGALORE'); 7 | INSERT INTO APARTMENT_BLOCK VALUES(7,'BLOCK-7','BANGALORE'); 8 | INSERT INTO APARTMENT_BLOCK VALUES(8,'BLOCK-8','BANGALORE'); 9 | INSERT INTO APARTMENT_BLOCK VALUES(9,'BLOCK-9','BANGALORE'); 10 | 11 | -------------------------------------------------------------------------------- /static/js/payment.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $("#myModal").modal('show'); 3 | }); 4 | 5 | $(function () { 6 | $("#txtName").keypress(function (e) { 7 | var keyCode = e.keyCode || e.which; 8 | $("#lblError").html(""); 9 | //Regex for Valid Characters i.e. Alphabets and Numbers. 10 | var regex = /^[A-Za-z -']+$/; 11 | //Validate TextBox value against the Regex. 12 | var isValid = regex.test(String.fromCharCode(keyCode)); 13 | if (!isValid) { 14 | $("#lblError").html("Only Alphabets and allowed."); 15 | } 16 | return isValid; 17 | }); 18 | }); -------------------------------------------------------------------------------- /static/js/Scripts.js: -------------------------------------------------------------------------------- 1 | function openAddForm() { 2 | document.getElementById("addForm").style.display = "block"; 3 | 4 | } 5 | 6 | function closeAddForm() { 7 | document.getElementById("addForm").style.display = "none"; 8 | } 9 | 10 | function openUpdateForm() { 11 | document.getElementById("updateForm").style.display = "block"; 12 | 13 | } 14 | 15 | function closeUpdateForm() { 16 | document.getElementById("updateForm").style.display = "none"; 17 | } 18 | 19 | function openDeleteForm() { 20 | document.getElementById("deleteForm").style.display = "block"; 21 | 22 | } 23 | 24 | function closeDeleteForm() { 25 | document.getElementById("deleteForm").style.display = "none"; 26 | } -------------------------------------------------------------------------------- /static/js/search.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($){ 2 | 3 | $('.live-search-list').each(function(){ 4 | $(this).attr('data-search-term', $(this).text().toLowerCase()); 5 | }); 6 | 7 | $('.live-search-box').on('keyup', function(){ 8 | 9 | var searchTerm = $(this).val().toLowerCase(); 10 | 11 | $('.live-search-list').each(function(){ 12 | 13 | if ($(this).filter('[data-search-term *= ' + searchTerm + ']').length > 0 || searchTerm.length < 1) { 14 | $(this).show(); 15 | } else { 16 | $(this).hide(); 17 | } 18 | 19 | }); 20 | 21 | }); 22 | 23 | }); -------------------------------------------------------------------------------- /database/trigger.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE TENANT_BACKUP( 2 | FNAME VARCHAR(25), 3 | LNAME VARCHAR(15), 4 | T_ID INTEGER AUTO_INCREMENT, 5 | PH_NO VARCHAR(12), 6 | EMAIL VARCHAR(30), 7 | GENDER CHAR, 8 | DOB DATE, 9 | OCCUPATION VARCHAR(30), 10 | ROOM_NO INTEGER, 11 | PSWD VARCHAR(25), 12 | PRIMARY KEY(T_ID), 13 | FOREIGN KEY(ROOM_NO) REFERENCES APARTMENT(ROOM_NO) ON DELETE SET NULL); 14 | 15 | 16 | DELIMITER // 17 | CREATE TRIGGER TRG_TENANT 18 | BEFORE DELETE ON TENANT 19 | FOR EACH ROW 20 | BEGIN 21 | INSERT INTO TENANT_BACKUP(FNAME, LNAME,T_ID, PH_NO, EMAIL, GENDER, DOB ,OCCUPATION, ROOM_NO) VALUES (OLD.FNAME, OLD.LNAME, OLD.T_ID, OLD.PH_NO, OLD.EMAIL, OLD.GENDER, OLD.DOB ,OLD.OCCUPATION, OLD.ROOM_NO); 22 | END ; // 23 | DELIMITER ; -------------------------------------------------------------------------------- /database/procedure.sql: -------------------------------------------------------------------------------- 1 | DELIMITER // 2 | CREATE PROCEDURE `RENTUPDATE`() 3 | BEGIN 4 | DECLARE ch_done INT DEFAULT 0; 5 | DECLARE U_LATEFEE INTEGER; 6 | DECLARE U_DUEDATE DATE; 7 | DECLARE U_RENTAMT INTEGER; 8 | DECLARE U_STATUS VARCHAR(10); 9 | DECLARE U_RENTID INTEGER; 10 | DECLARE U_RENT CURSOR FOR 11 | SELECT R.RENT_ID, R.RENT_FEE, R.DUE_DATE, R.LATE_FEE, S.R_STATUS 12 | FROM RENT AS R, RENT_STATUS AS S 13 | WHERE R.RENT_ID = S.RENT_ID AND R.DUE_DATE = CURDATE() 14 | FOR UPDATE; 15 | DECLARE EXIT HANDLER FOR NOT FOUND SET ch_done = 1; 16 | OPEN U_RENT; 17 | LOOP 18 | FETCH U_RENT INTO U_RENTID, U_RENTAMT, U_DUEDATE, U_LATEFEE, U_STATUS; 19 | IF ( U_STATUS != 'Unpaid' ) THEN 20 | SET U_LATEFEE = U_LATEFEE; 21 | ELSE 22 | SET U_LATEFEE = U_RENTAMT + U_LATEFEE + ((5 * U_RENTAMT)/100) ; 23 | END IF; 24 | UPDATE RENT_STATUS AS RS SET RS.R_STATUS = 'Unpaid' WHERE RS.R_STATUS = U_STATUS AND RS.RENT_ID = U_RENTID; 25 | UPDATE RENT AS R SET LATE_FEE = U_LATEFEE, DUE_DATE = (CURDATE() + INTERVAL 31 day ) 26 | WHERE DUE_DATE = U_DUEDATE AND R.RENT_ID = U_RENTID ; 27 | END LOOP; 28 | CLOSE U_RENT; 29 | END; // 30 | DELIMITER ; 31 | 32 | CALL RENTUPDATE(); -------------------------------------------------------------------------------- /templates/Reciept.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |
19 | | Tenant Id | 20 |First Name | 21 |Last Name | 22 |Gender | 23 |Phone No. | 24 |Room No. | 26 ||
|---|---|---|---|---|---|---|
| {{row[col]}} | 31 | {% endfor %} 32 |
Error: {{Error}}
20 | {% endif %} 21 |{{message}}
15 | {% endfor %} 16 | {% endif %} 17 | {% endwith %} 18 |
20 | Welcome To RoofTop Apartments
21 |----------------------------------------
22 | Logout 23 |
25 |
26 |
29 |
30 | Error: {{error}}
13 | {% endif %} 14 | {% if log %} 15 |{{log}}
16 | {% endif %} 17 |Error: {{Error}}
13 | {% endif %} 14 |4 | Apartment Rental Management System is based on searching the apartments available for rent in cities. The apartment owner updates details of the apartments available for rent and the customer is updated on these details such as area occupied, rent amount, location and so on. This system is best suitable for both owners as well as tenants and is also a best application in the city place. Tenants can easily search the suitable apartment with their preferred location and the rent amount. It also allows the tenants to pay their rent online. The Apartment Rental System helps to save a lot of time for both parties. Hence this system is best applicable for the above reasons making Apartment Rental an easy process through an online system.
5 | 6 | ### Technology Used 7 | * Front End - HTML, CSS, JavaScript 8 | * Back End - Python Flask 9 | * Database - MySql 10 | ### Requirements 11 | The source code of this project is written in Python. So, You'll require the following to run this project 12 | * Install libraries and dependencies listed in **requirements.txt** 13 | ```bash 14 | pip install -r requirements.txt 15 | ``` 16 | * Install **MYSQL Workbench** 17 | * Install **XAMPP** server 18 | ### How to Run the Project 19 | 1. Fork the repo and open the folder in your VSCode. 20 | 2. Copy all the sql commands listed in the **database** folder and run in on **MYSQL Workbench**. 21 | 3. Start the following two processes in **XAMPP** once it has been installed and loaded: 22 | * **Apache Webserver** - to serve HTTP requests. 23 | * **MySQL Server** - the database server. 24 | 4. Navigate to main.py file and run the file in VSCode. 25 | 5. Click on the link generated to run the project. 26 | 27 | -------------------------------------------------------------------------------- /templates/TotalUsers.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% block title %}Total Users{% endblock%} 3 | {% block script %} 4 | 5 | 6 | {% endblock %} 7 | {% block content %} 8 | 16 || First Name | 20 |Last Name | 21 |Gender | 22 |Phone No | 23 |Apt No. | 25 ||
|---|---|---|---|---|---|
| {{row[col]}} | 30 | {% endfor %} 31 |
| First Name | 25 |Last Name | 26 |Apt No. | 27 |Rent | 28 |Due date | 29 |Status | 30 |Late Fee | 31 |
|---|---|---|---|---|---|---|
| {{row[col]}} | 36 | {% endfor %} 37 |
Error: {{error}}
33 | {% endif %} 34 | {% if log2 %} 35 |{{log2}}
36 | {% endif %} 37 |{{ message }}
13 | {% endfor %} 14 | {% endif %} 15 | {% endwith %} 16 |35 | {% if aptRow['ROOM_NO'] %} 36 | Apartment No : {{ aptRow['ROOM_NO'] }} 37 | {% endif %} 38 | {% if aptRow['RENT_PER_MONTH'] %} 39 | Rent :{{ aptRow['RENT_PER_MONTH'] }} 40 | {% endif %} 41 | {% if aptRow['AREA'] %} 42 | Area : {{ aptRow['AREA'] }} Sq.ft. 43 | {% endif %} 44 |
45 | {% if aptRow['APARTMENT_DESC'] %} 46 |{{ aptRow['APARTMENT_DESC'] | replace('. ', '.
') | safe }}
| Tenant Id | 46 |First Name | 47 |Last Name | 48 |Gender | 49 |Phone No. | 50 |Room No. | 52 ||
|---|---|---|---|---|---|---|
| {{row[col]}} | 57 | {% endfor %} 58 |
{{msg7}}
19 | {% endif %} 20 |{{message}}
31 | {% endfor %} 32 | {% endif %} 33 | {% endwith %} 34 | {% if err %} 35 |Error: {{ err }}
36 | {% endif %} 37 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /static/css/RegisterStyle.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Sofia'); 2 | @font-face { 3 | font-family: Algerian; 4 | font-family: Lucida; 5 | src: url(sansation_light.woff); 6 | } 7 | 8 | * { 9 | margin: 0; 10 | padding: 0; 11 | box-sizing: border-box; 12 | font-family: Alegreya; 13 | } 14 | 15 | body { 16 | background: #00203FFF; 17 | } 18 | 19 | .navbar { 20 | position: fixed; 21 | padding-top: 20px; 22 | background-color: transparent; 23 | } 24 | 25 | .lead { 26 | font-size: 24px; 27 | font-family: Lucida; 28 | color: #ADEFD1FF; 29 | margin-left: 30px; 30 | text-decoration: none; 31 | } 32 | 33 | .box { 34 | position: relative; 35 | top: 70px; 36 | left: calc(50% - 520px); 37 | width: 1040px; 38 | height: 480px; 39 | background: #ADEFD1FF; 40 | color: #000; 41 | box-sizing: border-box; 42 | border: 1px solid black; 43 | box-shadow: 3px 3px 8px skyblue; 44 | border-radius: 3%; 45 | padding: 10px; 46 | } 47 | 48 | .image { 49 | position: absolute; 50 | top: -2px; 51 | left: -2px; 52 | height: 482px; 53 | width: 385px; 54 | border-radius: 3%; 55 | box-sizing: border-box; 56 | border: 1px solid black; 57 | background-size: cover; 58 | background-position: center; 59 | background-repeat: no-repeat; 60 | } 61 | 62 | .row .column2 { 63 | 64 | float: right; 65 | width: 665px; 66 | padding-left: 35px; 67 | } 68 | 69 | .row .column1 { 70 | float: left; 71 | width: 385px; 72 | padding: 0; 73 | } 74 | 75 | .row:after { 76 | content: ""; 77 | display: table; 78 | clear: both; 79 | } 80 | 81 | .details h1 , h2{ 82 | margin-bottom: 24px; 83 | } 84 | 85 | .details h1 { 86 | margin-left: 146px; 87 | font-size: 38px; 88 | font-family: Lucida; 89 | } 90 | 91 | .details .input-field, .input-field7 { 92 | font-size: 18px; 93 | margin-bottom: 21px; 94 | font-family: cursive; 95 | font-weight: bold; 96 | } 97 | 98 | .input-field input[type="text"] , input[type="date"], input[type="number"], input[type="password"], input[type="email"] 99 | { 100 | border: none; 101 | border-bottom: 1px solid #000; 102 | background: transparent; 103 | outline: none; 104 | height: 24px; 105 | color: #000; 106 | font-size: 18px; 107 | font-family: Lucida; 108 | } 109 | 110 | .input-field input[placeholder="dd/mm/yyyy"] 111 | { 112 | font-size: 18px; 113 | font: lighter; 114 | color: grey; 115 | } 116 | 117 | .input-field input[type=radio] 118 | { 119 | accent-color: darkgrey; 120 | } 121 | 122 | .input-field .l1, .l2 { 123 | width: 185px ; 124 | } 125 | 126 | .input-field .l3 { 127 | width: 150px; 128 | } 129 | 130 | .input-field .l4 { 131 | width: 170px; 132 | } 133 | 134 | .input-field .occupation { 135 | margin-left: 20px; 136 | } 137 | 138 | .input-field #occ { 139 | width: 180px; 140 | } 141 | 142 | .input-field .l6 { 143 | width: 260px; 144 | } 145 | 146 | .input-field .l8 { 147 | margin-left: 40px; 148 | } 149 | 150 | .input-field #room_no { 151 | width: 100px; 152 | } 153 | 154 | .input-field .female, .others { 155 | margin-left: 10px; 156 | } 157 | 158 | .input-field .male { 159 | margin-left: 2px; 160 | } 161 | 162 | .input-field .lb2 , .lb4{ 163 | margin-left: 44px; 164 | } 165 | 166 | .input-field7 .l7{ 167 | width: 175px ; 168 | } 169 | 170 | .input-field7 .pswd { 171 | margin-left: 22px; 172 | } 173 | 174 | .input-field7 { 175 | margin-bottom:7px; 176 | } 177 | 178 | .fields .message { 179 | font-size: 11px; 180 | display: inline; 181 | visibility: visible; 182 | } 183 | 184 | .fields #message .invalid { 185 | font-family: Lucida; 186 | display: inline; 187 | color: #000; 188 | } 189 | 190 | .details .subBtn { 191 | height: 60px; 192 | width: 120px; 193 | background: #00203FFF; 194 | color: #fff; 195 | border: 1px solid #000; 196 | border-radius: 15%; 197 | text-align: center; 198 | font-size: 20px; 199 | font-family: Lucida; 200 | align-items: center; 201 | box-shadow: 2px 2px 4px #000; 202 | margin-left: 38%; 203 | transition: all 0.3s linear; 204 | cursor: pointer; 205 | margin-top: -5px; 206 | } 207 | 208 | input[type="submit"]:hover { 209 | color: #008080; 210 | font-weight: bold; 211 | } 212 | 213 | .msg1 { 214 | color:white; 215 | position:fixed; 216 | z-index: 9; 217 | top:13px; 218 | left:calc(50% - 100px); 219 | font-size:22px; 220 | -webkit-animation: cssAnimation 5s forwards; 221 | animation: cssAnimation 5s forwards; 222 | } 223 | 224 | @keyframes cssAnimation { 225 | 0% {opacity: 1;} 226 | 80% {opacity: 0.8;} 227 | 90% {opacity: 0.3;} 228 | 100% {opacity: 0;} 229 | } 230 | 231 | @-webkit-keyframes cssAnimation { 232 | 0% {opacity: 1;} 233 | 80% {opacity: 0.8;} 234 | 90% {opacity: 0.3;} 235 | 100% {opacity: 0;} 236 | } -------------------------------------------------------------------------------- /static/css/PaymentStyle.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: Lucida; 3 | src: url(sansation_light.woff); 4 | } 5 | 6 | *{ 7 | padding: 0; 8 | margin: 0; 9 | outline: none; 10 | border: none; 11 | text-decoration: none; 12 | box-sizing: border-box; 13 | font-family: cursive; 14 | } 15 | 16 | body { 17 | background: #adefd1ff; 18 | } 19 | 20 | /*-------------------Popup Window-----------------*/ 21 | /* 22 | .modal-dialog { 23 | width: 430px; 24 | } 25 | 26 | .modal-header { 27 | background: #00203fff; 28 | color: #adefd1ff; 29 | } 30 | 31 | button{ 32 | background: #00203fff; 33 | } 34 | 35 | .fa-xmark { 36 | color: #adefd1ff; 37 | background: #00203fff; 38 | } 39 | 40 | .modal-body img { 41 | width: 400px; 42 | height: 200px; 43 | padding: 0; 44 | margin: 0; 45 | } */ 46 | 47 | /*------------------Actual Window-----------------*/ 48 | 49 | .payment header { 50 | position: fixed; 51 | width: 100%; 52 | background: #00203fff; 53 | } 54 | 55 | .payment header a { 56 | text-decoration: none; 57 | color: #ADEFD1FF; 58 | } 59 | 60 | .payment header p { 61 | color: #ADEFD1FF; 62 | font-size: 26px; 63 | padding: 10px 0 0 35px; 64 | font-family: Lucida; 65 | } 66 | 67 | .payment .fa-arrow-left { 68 | padding-right: 30px; 69 | font-size: 30px; 70 | } 71 | 72 | .payment .fa-credit-card { 73 | padding-right: 10px; 74 | } 75 | 76 | .payment .payment-box { 77 | position: fixed; 78 | top: 40px; 79 | width: 100%; 80 | } 81 | 82 | /*---------Personal details----------*/ 83 | 84 | table { 85 | font-family: cursive; 86 | border-collapse: collapse; 87 | width: 1100px; 88 | background: transparent; 89 | color: #000; 90 | position: relative; 91 | margin-top: 35px; 92 | left: calc(50% - 550px); 93 | font-size: 18px; 94 | } 95 | 96 | th { 97 | border: 1px solid black; 98 | text-align: center; 99 | padding: 5px 0 5px 0; 100 | 101 | } 102 | 103 | td { 104 | border-left: 1px solid black; 105 | border-right: 1px solid black; 106 | text-align: center; 107 | } 108 | 109 | .tr7 { 110 | border-bottom: 1px solid black; 111 | } 112 | 113 | .name { 114 | padding-top: 9px; 115 | } 116 | 117 | input[type="text"], input[type="number"], input[type="email"], input[type="month"] { 118 | border: none; 119 | background: transparent; 120 | outline: none; 121 | border-bottom: 1px solid black; 122 | margin-left: 20px; 123 | height: 30px; 124 | font-size: 18px; 125 | font-family: Lucida; 126 | } 127 | 128 | input[type="month"] { 129 | width: 150px; 130 | } 131 | 132 | .user-details .if1, .user-details .if2 { 133 | width: 280px; 134 | } 135 | 136 | .user-details .if3, .user-details .if5, .user-details .if6, 137 | .user-details .if7 { 138 | width: 200px; 139 | } 140 | 141 | .user-details .if4 { 142 | width: 140px; 143 | } 144 | 145 | .user-details .if8 { 146 | width: 80px; 147 | } 148 | 149 | .user-details .l8 { 150 | margin-left: 40px; 151 | } 152 | 153 | .payment-box .pay-btn, .payment-box .cancel-btn { 154 | background: #00203fff; 155 | color: #adefd1ff; 156 | height: 40px; 157 | font-size: 20px; 158 | border-radius: 10%; 159 | margin-top: 20px; 160 | text-align: center; 161 | } 162 | 163 | .payment-box .pay-btn { 164 | width: 80px; 165 | margin-left: 460px; 166 | } 167 | 168 | .payment-box .cancel-btn { 169 | width: 100px; 170 | margin-left: 120px; 171 | } 172 | 173 | .payment-box button:hover { 174 | font-weight: bold; 175 | color: ghostwhite; 176 | } 177 | 178 | /*---------Flashed message---------*/ 179 | 180 | .msg { 181 | font-size: 22px; 182 | color: #fff; 183 | background-color: #000; 184 | border: 1px solid #00203FFF; 185 | width: 500px; 186 | height: 150px; 187 | text-align: center; 188 | padding-top: 59px; 189 | position: fixed; 190 | top: calc(50% - 75px); 191 | left: calc(50% - 250px); 192 | z-index: 9; 193 | -webkit-animation: cssAnimation 5s forwards; 194 | animation: cssAnimation 5s forwards; 195 | } 196 | 197 | @keyframes cssAnimation { 198 | 0% {opacity: 1;} 199 | 80% {opacity: 0.8;} 200 | 90% {opacity: 0.3;} 201 | 100% {opacity: 0;} 202 | } 203 | 204 | @-webkit-keyframes cssAnimation { 205 | 0% {opacity: 1;} 206 | 80% {opacity: 0.8;} 207 | 90% {opacity: 0.3;} 208 | 100% {opacity: 0;} 209 | } 210 | 211 | /*----------Error Msg------*/ 212 | 213 | .error { 214 | font-size: 20px; 215 | color: #fff; 216 | background-color: #000; 217 | border: 1px solid #00203FFF; 218 | width: 500px; 219 | height: 80px; 220 | text-align: center; 221 | padding-top: 22px; 222 | position: fixed; 223 | top: calc(50% - 75px); 224 | left: calc(50% - 200px); 225 | z-index: 9; 226 | -webkit-animation: cssAnimation 5s forwards; 227 | animation: cssAnimation 5s forwards; 228 | } 229 | 230 | @keyframes cssAnimation { 231 | 0% {opacity: 1;} 232 | 80% {opacity: 0.8;} 233 | 90% {opacity: 0.3;} 234 | 100% {opacity: 0;} 235 | } 236 | 237 | @-webkit-keyframes cssAnimation { 238 | 0% {opacity: 1;} 239 | 80% {opacity: 0.8;} 240 | 90% {opacity: 0.3;} 241 | 100% {opacity: 0;} 242 | } -------------------------------------------------------------------------------- /static/css/ApartmentRoomsStyle.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: Algerian; 3 | font-family: Lucida; 4 | src: url(sansation_light.woff); 5 | } 6 | 7 | 8 | *{ 9 | padding: 0; 10 | margin: 0; 11 | outline: none; 12 | border: none; 13 | text-decoration: none; 14 | box-sizing: border-box; 15 | font-family: cursive; 16 | } 17 | 18 | body { 19 | background: #ADEFD1FF; 20 | color: #00203FFF; 21 | } 22 | 23 | a { 24 | text-decoration: none; 25 | color: #ADEFD1FF; 26 | } 27 | 28 | 29 | /* navbar styling */ 30 | .navbar { 31 | background: transparent; 32 | background-size: auto; 33 | display: inline; 34 | } 35 | 36 | .navbar .nav-bar { 37 | display: inline-block; 38 | list-style: none; 39 | } 40 | 41 | .rooms { 42 | padding-top: 30px; 43 | padding-left: 35px; 44 | font-size: 36px; 45 | font-family: 'Times New Roman', Times, serif; 46 | text-transform: uppercase; 47 | font-weight: bold; 48 | } 49 | 50 | .search { 51 | padding-left: 320px; 52 | padding-bottom: 80px; 53 | } 54 | 55 | .search input[type="number"] { 56 | background: transparent; 57 | height: 25px; 58 | width: 210px; 59 | color: black; 60 | outline: none; 61 | border: none; 62 | font-size: 18px; 63 | border-bottom: 2px solid #00203FFF; 64 | margin-right: 25px; 65 | } 66 | 67 | .crud { 68 | margin-left: 700px; 69 | } 70 | 71 | /* buttons*/ 72 | .crud li, .nav-bar li { 73 | margin-top: -10px; 74 | display: inline-block; 75 | list-style: outside none none; 76 | } 77 | 78 | .next, .previous { 79 | font-size: 30px; 80 | color: #00203FFF; 81 | } 82 | 83 | .previous { 84 | margin-left: 80px; 85 | } 86 | 87 | .next { 88 | margin-left: 50px; 89 | } 90 | 91 | .operations { 92 | width: 140px; 93 | height: 60px; 94 | background: #00203FFF; 95 | border: 1px solid black; 96 | color: #ADEFD1FF; 97 | border-radius: 10%; 98 | margin-left: 20px; 99 | text-align: center; 100 | font-size: 20px; 101 | font-family: Lucida; 102 | } 103 | 104 | .operations:hover a { 105 | color: ghostwhite; 106 | font-weight: bold; 107 | } 108 | 109 | .operations:hover { 110 | color: ghostwhite; 111 | font-weight: bold; 112 | } 113 | 114 | .fa-plus { 115 | font-size: 24px; 116 | padding-left: 10px; 117 | } 118 | 119 | .fa-pen-to-square, .fa-trash { 120 | font-size: 20px; 121 | padding-left: 8px; 122 | } 123 | 124 | /* The popup form - hidden by default */ 125 | 126 | .form-popup, .add-form-popup { 127 | display: none; 128 | position: absolute; 129 | top: 115px; 130 | left: calc(50% - 310px); 131 | z-index: 9; 132 | } 133 | 134 | .add-form-popup { 135 | margin-left: auto; 136 | margin-right: auto; 137 | } 138 | 139 | /* Add styles to the form container */ 140 | .form-container, .add-form-container { 141 | width: 620px; 142 | height: auto; 143 | padding: 30px 10px 40px 20px; 144 | background-color: #00203FFF; 145 | color: #ADEFD1FF; 146 | border: 2px solid #fff; 147 | box-shadow: 2px 2px 6px #fff; 148 | } 149 | 150 | .add-form-container { 151 | margin-bottom: 40px; 152 | } 153 | 154 | .heading { 155 | font-size: 28px; 156 | text-align: center; 157 | font-family: Lucida; 158 | } 159 | 160 | .divider-custom { 161 | text-align: center; 162 | padding-bottom: 40px; 163 | } 164 | 165 | .apartment-info { 166 | font-family: cursive; 167 | font-size: 16px; 168 | margin-left: 25px; 169 | margin-right: 25px; 170 | padding: 0px; 171 | } 172 | 173 | .input-field input[type="text"], input[type="number"] 174 | { 175 | border: none; 176 | border-bottom: 1px solid ghostwhite; 177 | background: transparent; 178 | outline: none; 179 | height: 24px; 180 | color: ghostwhite; 181 | font-size: 18px; 182 | font-family: Lucida; 183 | margin-bottom: 25px; 184 | } 185 | 186 | textarea { 187 | border: none; 188 | border-bottom: 1px solid ghostwhite; 189 | background: transparent; 190 | outline: none;color: ghostwhite; 191 | font-size: 18px; 192 | font-family: Lucida; 193 | } 194 | 195 | .input-field input[type="text"] { 196 | width: 170px; 197 | } 198 | 199 | .input-field input[type="number"] { 200 | width: 90px; 201 | } 202 | 203 | .input-field .l1 { 204 | padding-left: 30px; 205 | } 206 | 207 | .input-field .l2 { 208 | padding-left: 70px; 209 | } 210 | 211 | .input-field p { 212 | padding: 20px 30px; 213 | } 214 | 215 | .input-field .Desc { 216 | margin-top: -30px; 217 | } 218 | 219 | .input-field #apartmentTitle { 220 | width: 400px; 221 | } 222 | 223 | #up_title { 224 | width:340px; 225 | } 226 | 227 | /* Set a style for the submit/login button */ 228 | 229 | .form-container .btn, .form-container .cancel ,.add-form-container .btn, .add-form-container .cancel { 230 | background-color: #ADEFD1FF; 231 | color: #000; 232 | padding: 10px 20px; 233 | border: 1px solid #000; 234 | border-radius: 10%; 235 | cursor: pointer; 236 | width: 95px; 237 | height: 48px; 238 | text-align: center; 239 | margin-top: 25px; 240 | font-size: 18px; 241 | box-shadow: 2px 2px 4px #000; 242 | } 243 | 244 | .btn { 245 | margin:0 35px 0 160px; 246 | } 247 | 248 | /* flexboxes for images */ 249 | 250 | table { 251 | border-collapse: separate; 252 | border-spacing: 0 85px; 253 | display: block; 254 | width: 900px; 255 | margin-left: 280px; 256 | } 257 | 258 | tr { 259 | border: 2px solid #fff; 260 | background-color: #00203FFF; 261 | color: #ADEFD1FF; 262 | } 263 | 264 | td { 265 | height: 300px; 266 | padding: 20px 50px 20px 20px; 267 | } 268 | 269 | #box #image { 270 | width: 220px; 271 | height: 220px; 272 | margin: 20px 60px 0 20px; 273 | float: left; 274 | border-radius: 10px; 275 | } 276 | 277 | #image img { 278 | width: 220px; 279 | height: 220px; 280 | border-radius: 10px; 281 | border: 2px solid #fff; 282 | } 283 | 284 | .details { 285 | padding: 10px; 286 | } 287 | 288 | #apartmentDetails { 289 | margin-top: 30px; 290 | } 291 | -------------------------------------------------------------------------------- /templates/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |Turn the key, walk through the door. This new HOUSE is all, you ever wanted and more...
13 |Welcome To RoofTop Apartments
14 |Quality Lifestyle
15 |{{ msg1 }}
60 | 61 | {% endif %} 62 |
67 | Password must contain a lowercase letter,
109 |a uppercase letter,
110 |a number
111 | and minimum
of 8 characters.
ADD APARTMENT
26 | 27 |
48 | 49 | sqft 50 |
51 |Choose Photos to be displayed :
54 |55 | 56 |
57 |58 | 59 |
60 |61 | 62 |
63 |64 | 65 |
66 |67 | 68 | 69 |
70 |
71 |
72 |
73 |
UPDATE APARTMENT
87 | 88 |
DELETE APARTMENT
125 | 126 |
|
150 | {% for i in img_url %}
151 | {% if i['ROOM_NO'] == msg3Row['ROOM_NO'] %}
152 | {% set value = i['PATHNAME']+'/'+i['PHOTO1'] %}
153 | |
157 |
158 | {% if msg3Row['APT_TITLE'] %}
159 | {{ msg3Row['APT_TITLE'] }} 160 | {% endif %} 161 |162 | {% if msg3Row['ROOM_NO'] %} 163 | Apartment : {{ msg3Row['ROOM_NO'] }} 164 | {% endif %} 165 | {% if msg3Row['AREA'] %} 166 | Area : {{ msg3Row['AREA'] }} Sqft. 167 | {% endif %} 168 | {% if msg3Row['RENT_PER_MONTH'] %} 169 | Rent : {{ msg3Row['RENT_PER_MONTH'] }} 170 | {% endif %} 171 | 172 | {% if msg3Row['APARTMENT_DESC'] %} 173 |{{ msg3Row['APARTMENT_DESC'] | replace('. ', '. |
176 |