The Little Lemon bistro website is a Django-based project that allows users to view the menu and make reservations online. It utilizes the Django Rest Framework (DRF) for API endpoints.
- View Menu: Users can view the bistro's current menu by going to
/api/menu
. - Make Reservations: Users can create new reservations at
/api/booking
.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Ensure you have Python 3.8 or later installed on your system. You can download it here.
-
Clone this repository:
git clone https://github.com/WinTush/littlelemon.git cd littlelemon/
-
Create a virtual environment:
-
On macOS and Linux:
python3 -m venv env
-
On Windows:
py -m venv env
-
-
Activate the virtual environment:
-
On macOS and Linux:
source env/bin/activate
-
On Windows cmd shell:
.\env\Scripts\activate
-
-
Install requirements from
requirements.txt
file using pip:pip install -r requirements.txt
-
Apply migrations as follows:
python manage.py migrate
-
Run the server locally using the command below, then navigate to http://localhost:8000/api/menu or http://localhost:8000/api/booking in any web browser:
python manage.py runserver
We use pytest for our tests.
To run tests, execute:
pytest
Enjoy exploring Little Lemon Bistro!