This is a Flask-based web application for managing a hostel. It includes functionalities for enrolling students, managing rooms, tracking expenses, and more.
- Enroll students with details including name, fee, room number, and picture.
- Manage rooms and see which students are assigned to which rooms.
- Track monthly expenses by adding items and their prices.
- View a list of all students and rooms.
- Responsive design using Bootstrap.
-
Clone the repository:
git clone https://github.com/yourusername/Hostel-Management-System-Using-Flask.git cd Hostel-Management-System-Using-Flask
-
Create a virtual environment and activate it (virtual environment directory name is
.venv
):python3 -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
-
Install
pipenv
package managerpip install pipenv
-
Install the dependencies:
pipenv install
-
Initialize the database:
flask db init flask db upgrade
-
Run the application:
flask run
-
Open your browser and navigate to
http://127.0.0.1:5000
.
app.py
: Main application file containing routes and logic.models.py
: Database models for Student, Room, and Expense.forms.py
: Forms for enrolling students and adding expenses.templates/
: HTML templates for the application pages.static/
: Static files including CSS and images.migrations/
: Database migration files.
/
: Home page with links to enroll, view students, view rooms, and manage expenses./enroll
: Form to enroll a new student./students
: List of all enrolled students./rooms
: List of all rooms and their assigned students./expenses
: Form to add expenses and view total monthly expenses.
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Please open an issue or submit a pull request.
For any questions or suggestions, please contact [email protected].