You can test live demo here: Theater Seating Algorithm / API
- Clone the project
- Open terminal and create a virtual environment:
virtualenv venv
- Activate virtual environment:
source venv/bin/activate
- Install packages:
pip install -r requirements.txt
- Migrate and create database:
python manage.py migrate
- Run server:
python manage.py runserver
- You can run tests:
python manage.py test
- Open the browser and browse this URL:
127.0.0.1:8000
- Create a section
- Create seats in the section
- Create customers
- Seat customers
Click on Quickstart
button on the navbar to create a section with 3 rows and 8 seats in every row.
You can delete all Sections and all Customers by browsing to reset section. The reset section can be found in the navbar items.
API links can be found on the navbar.
URL: /api/retrieve-sections/
URL: /api/retrieve-seats/
Data load sample: { "section_id":1 }
URL: /api/retrieve-single-seat/
Data load sample: { "customer_name":"Amin" }
URL: /api/bulk-seating/
Data load sample: { "section_id":1, "customer_list":[ [ "A", "aisle", "3" ], [ "B", "", "3" ] ] }