Skip to content

aminbahrabadi/guts_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Theater Seating Algorithm / API

Live demo

You can test live demo here: Theater Seating Algorithm / API

How to run

  1. Clone the project
  2. Open terminal and create a virtual environment:
    virtualenv venv
  3. Activate virtual environment:
    source venv/bin/activate
  4. Install packages:
    pip install -r requirements.txt
  5. Migrate and create database:
    python manage.py migrate
  6. Run server:
    python manage.py runserver
  7. You can run tests:
    python manage.py test
  8. Open the browser and browse this URL:
    127.0.0.1:8000

Quickstart

  1. Create a section
  2. Create seats in the section
  3. Create customers
  4. Seat customers

OR

Click on Quickstart button on the navbar to create a section with 3 rows and 8 seats in every row.

Reseting

You can delete all Sections and all Customers by browsing to reset section. The reset section can be found in the navbar items.

Api

API links can be found on the navbar.

Sections Retrieve (GET request):


URL: /api/retrieve-sections/

Seats Retrieve (POST request):


URL: /api/retrieve-seats/
Data load sample: { "section_id":1 }

Ticket wallet api (POST request):


URL: /api/retrieve-single-seat/
Data load sample: { "customer_name":"Amin" }

Seat customers api (POST request):


URL: /api/bulk-seating/
Data load sample: { "section_id":1, "customer_list":[ [ "A", "aisle", "3" ], [ "B", "", "3" ] ] }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published