This is an API that allows registered users to book tables, manage bookings, add menus, update menus, and access various functionalities through the browsable API provided by Django REST Framework. The project includes two unit tests in the app directory that ensure the correct behavior of key functionalities and help maintain code quality.
Superuser Account: You can log in to the admin panel with the following credentials:
- URL: /admin
- Username: admin
- Password: lemon@789!
Endpoint | Method |
---|---|
/restaurant | GET |
/restaurant/menu | GET - POST |
/restaurant/menu/id | GET - PUT - DELETE |
/restaurant/booking/tables | GET - POST |
/restaurant/bookings/tables/id | GET - PUT - DELETE |
/auth/token/login | POST (Create token) |
/auth/users | GET - POST - see djoser's documentation |
- Python 3.x
- Pipenv: Install using
pip install pipenv
- MySQL (optional)
Note: This project is configured to use MySQL as the database. If you prefer to use SQLite, follow the steps in settings.py.
-
Clone the repo and cd into the project:
git clone https://github.com/yeroldsan/lemon-bistro-api.git cd lemon-bistro-api
-
Check out and follow the instructions in the .env.example file.
-
Activate your virtual environment and install packages:
pipenv shell pipenv install
-
Read the note above this instrucions, and after updating the file run:
python manage.py makemigrations python manage.py migrate
-
Run the development server (running by default on http://localhost:8000):
python manage.py runserver