To run the application:
- Clone the repository to your local machine.
- Run
pip install -r requirements.txtto install requirements. - Run a PostgreSQL instance on port 5432 and create a database named restaurantapidb with user postgres and password postgres.
- Run
python manage.py makemigrations>python manage.py migrateto migrate your db. - Run
python manage.py runserverto run the application. - Run
python manage.py createsuperuseror go tohttp://127.0.0.1:8000/signupto create a user. - Login at
http://127.0.0.1:8000/login. - Run test with
pytestcommand.
employees/ > get list of all employees/users and add a new employee/user.
restaurants/ > get list of all restaurants and add a new restaurant.
restaurant/<int:pk>/ > get info about a specific restaurant, its menu and its items.
menus/<int:pk>/ > get info about all menus that belong to a specific restaurant.
menu_items/<int:pk>/ > get info about all menu items in a specific menu.
create_menu/<int:pk>/ > create a menu for a restaurant with items.
current_day_menu/<int:pk>/ > get a current day menu for a restaurant.