Thank to Django and Django REST Framework. This API is created using these two Python Frameworks. DRF Spectacular allows Frontend Developers to understand the documentation of the Booking-API
- Booking Appointment in a hospital
- Booking tickets to airlines
- Booking tickets to concerts
- Request a taxi
- Food Delivery
- Booking Hotel
- Clone the Repository from GitHub and enter into repo from command line
git clone https://github.com/dev-yusupov/booking-api.git
cd booking-api
- Install requirements
pip install -r requirements.txt
- Make migrations
python manage.py makemigrations
python manage.py migrate
- Run server
python manage.py runserver
Contain User model inherited from AbstractUser
Also contains two forms: CustomUserCreationForm(UserCreationForm) and CustomUserChange(UserChangeForm)
first_name CharField (max_length - 50)
last_name CharField (max_length - 50)
phone_number PhoneNumber (max_length - 17)
email Email
password Password
is_user Boolean (default=True)
first_name CharField (max_length - 50)
last_name CharField (max_length - 50)
phone_number PhoneNumber
email EmailField
password PasswordField
is_taxi Bool (default=True)
car_size Charfield(choices=['small', 'medium', 'big'])
This app allows to make orders to the users of Booking-API app
user ForeignKey
user_name Charfield
user_phone_number Phone number
user_email Email
location CharField(max_length = 200)
destination CharField(max_length = 200)
is_econom Boolean
is_business Boolean
is_premium Boolean
This app also has a calculator which help to calculate price of order using geopy library.
To install geopy type the following command to CMD:
pip install geopy
This app helps to book a room from hotels for the users of the Booking-API.
- Hotel
- HotelRoomOrder
- Hotel ID (automatically generates the 6-digit ID)
- Hotel name
- Hotel Location - (this field is URLField, while registring new hotel it will be required to paste the url of location of the hotel from Google Maps)
- Minimum Price - it is required field
- Phone number - this field takes the number of phone of hotel
- Optional Fields are - Hotel email and website (both will be URL Fields)
- Start of the work - TimeField
- End of the working hours - TimeField
- !!! All BOTH FIELDS ABOVE REQUIRED BECAUSE BOOKERS SHOULD KNOW THE OPEN HOURS OF RECEPTION AT HOTELS.!!!
- 3 image fields will be required.
- OrderID - UUID4
- Number of Rooms - this field is required because hotel reception should know how many rooms are booked by app user.
- Number of people.
- date_start
- date_to
- additional_points - TextField() the following field is added because some customers may need additional things from hotel for example a conference room or a fitness club from hotel. Therefore this field is added.