HotelHeroic is a Django application built for managing hotel operations and reservations.
- Reservation Management: Manage hotel reservations, including booking details, guest information, and room assignments.
- Room Availability: Check room availability for specific dates and make new reservations.
- Billing and Invoicing: Generate invoices for guests and handle billing transactions.
- Reporting: Generate reports to analyze occupancy rates, revenue, and other key metrics.
- User Management: Manage user accounts and assign roles and permissions.
-
Clone the repository:
git clone https://github.com/bvedad/hotelheroic-django.git
-
Create a virtual environment and activate it:
python3 -m venv env source env/bin/activate
-
Install the Python dependencies:
pip install -r requirements.txt
-
Set up the database:
psql postgres -c "CREATE ROLE hh_role;"
psql postgres -c "CREATE USER hh_user WITH PASSWORD 'password' IN ROLE hh_role;"
psql postgres -c "CREATE DATABASE hh_db OWNER hh_role;"
psql postgres -c "CREATE SCHEMA hh_db;"
psql postgres -c "ALTER USER hh_user CREATEDB;"
- Apply database migrations
python manage.py migrate
-
Start the development server:
python manage.py runserver
The application will be accessible at http://localhost:8000
To recompile SCSS files, follow this setup:
- Install tools
- Change the working directory to
assets
folder
$ cd apps/static/assets
- Install modules (this will create a classic
node_modules
directory)
$ npm install
// OR
$ yarn
- Edit & Recompile SCSS files
$ gulp
The generated files (css, min.css) are saved in static/assets/css
directory.
The app is provided with a basic configuration to be executed in Docker , Gunicorn, and Waitress.
Docker execution
The application can be easily executed in a docker container. The steps:
Get the code
$ git clone https://github.com/app-generator/priv-django-dashboard-volt-pro.git
$ cd hotelheroic-django
Start the app in Docker
$ sudo docker-compose pull && sudo docker-compose build && sudo docker-compose up -d
Visit http://localhost:85
in your browser. The app should be up & running.
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX.
Install using pip
$ pip install gunicorn
Start the app using gunicorn binary
$ gunicorn --bind=0.0.0.0:8001 core.wsgi:application
Serving on http://localhost:8001
Visit http://localhost:8001
in your browser. The app should be up & running.
Waitress (Gunicorn equivalent for Windows) is meant to be a production-quality pure-Python WSGI server with very acceptable performance. It has no dependencies except ones that live in the Python standard library.
Install using pip
$ pip install waitress
Start the app using waitress-serve
$ waitress-serve --port=8001 core.wsgi:application
Serving on http://localhost:8001
Visit http://localhost:8001
in your browser. The app should be up & running.
- Django - The official website
- Boilerplate Code - Index provided by AppSeed
- Boilerplate Code - Index published on Github