This repository contains working Django code. Run your code locally, you don't need any external services.
- use Python version 3.13
- install dependencies by running:
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py init_data
python manage.py runserver 0.0.0.0:8000
- The file
views.pycontains a webhook endpoint to receive updates from the PMS. These updates don't contain any details of the actual reservations. They require you to fetch additional details of any reservation. - The file
external_api.pymocks API calls that are available to you to get additional guest and reservation details. Note that the API calls sometimes generate errors, or invalid data. You should deal with those in the way you see fit. - The file
pms_systems.pycontains an AbstractBaseClass and a ChildClass of aPMS. You will find explanations of what all the methods do inside the methods of the ABC. - The file
models.pycontains your database models. The models should be mostly self-explanatory. Relations are defined and some columns havehelp_text.
- The file
views.pycontains:- an endpoint that renders the chat page (
chat), with a guest list on the left - an endpoint that returns guest details in JSON (
guest_data)
- an endpoint that renders the chat page (
- The template
hotel/chat.htmlalready renders the guest list (server-side). - A React widget placeholder is included in the template (
<div id="react-widget"></div>).
Your task is to mount a component here and fetch/display guest details. - Instructions for installing and running the widget are in the Widget README.
- A wireframe of the expected layout is included in
docs/wireframe.png.