Skip to content

V2VaibhavVerma/hospitality_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Explanation of the README.md:

  • Project Structure: Outlines the files and their purpose.
  • Files and their Contents: Provides a detailed explanation of each file, including its contents and purpose.
  • Example CSV Files: Shows examples of how hostel_info.csv and group_info.csv should be structured.
  • How to Run the Project: Provides a step-by-step guide on how to run the application.
  • Contributions: Encourages contributions from others.
  • License: Specifies the license under which the project is released.

Hospitality Room Allocation System

This project implements a simple room allocation system for a hostel, taking into account group gender and room capacity.

Project Structure

  • index.html: The main HTML file containing the user interface for uploading CSV files and viewing the allocation results.
  • app.py: The Flask application that handles file uploads, room allocation logic, and result display.
  • hostel_info.csv: A CSV file containing information about available rooms in the hostel.
  • group_info.csv: A CSV file containing information about the groups to be allocated.
  • allocations/allocation.csv: A CSV file generated by the application, containing the room allocation results.

Files and their Contents

1. index.html

This file contains the HTML structure for the user interface. It provides:

  • A form for uploading two CSV files:
    • group_info.csv: Information about the groups to be allocated.
    • hostel_info.csv: Information about the available rooms.
  • A button to trigger the upload and allocation process.
  • A link to download the generated allocation.csv file.

2. app.py

This file implements the Flask application, which performs the following tasks:

  • File Uploads: Handles the upload of group_info.csv and hostel_info.csv.
  • Room Allocation: Implements the core logic for allocating groups to rooms based on gender and capacity.
  • Result Generation: Creates allocation.csv containing the allocation results.
  • Result Display: Shows the allocation results in an HTML table.
  • Download: Allows users to download allocation.csv.

3. hostel_info.csv

This file stores information about available rooms in the hostel. It has the following columns:

  • Hostel Name: The name of the hostel.
  • Room Number: A unique identifier for each room.
  • Capacity: The number of people a room can accommodate.
  • Gender: The gender assigned to the room (e.g., 'Boy', 'Girl', or 'Mixed').

Example hostel_info.csv:

Hostel Name,Room Number,Capacity,Gender
Hostel A,A101,3,Boy
Hostel A,A102,4,Girl
Hostel B,B201,3,Boy
Hostel B,B202,2,Girl

`group_info.csv`: A CSV file containing information about the groups to be allocated.
**Example `group_info.csv`:**
Group ID,Members,Gender
101,3,Boys
102,4,Girls
103,2,Boys
104,5,Girls
105,8,5 Boys & 3 Girls


`allocations/allocation.csv`: A CSV file generated by the application, containing the room allocation results.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published