A restful API that exposes a restaurant menu items with ability to add and update dishes along displaying the menu list also it provides booking tables to authenticated users, you can register and login as a user through token based authentication.
-
POST REQUEST: auth/users/ : An api endpoint for user registration
-
POST REQUEST: auth/token/login: Generate user's access-token {username and password}
-
restaurant/menu:
- GET: returns all the menu items
-
restaurant/menu/int:pk:
-
GET: return item with the specified id
-
PUT: update item with the specified id
-
DELETE: delete item with the specified id
-
-
restaurant/booking/booking:
-
GET:return a list of booked tables
-
POST: book a table
-
- Installing Python if it's not already setup used Version is 3.10.11
- Setting up the virtual environment using venv using the window's cmd:
python -m venv myenv
-
the required packages : django, djangorestframework, mysqlclient, djoser
-
Running pipenv Virtual Environment:
myenv\Scripts\activate
-
Configuration of mysql database
- Set the database engine - django.db.backends.mysql
- set the Host,user,password,port variables according to your setup
-
Running the Server:
python manage runserver