This project provides a ToDo List Challenge Django application.
Installation
Choose one of the following installation methods:
Docker
-
Build the Docker image:
docker build -t todo_challenge .
-
Run the container, exposing port 8000 for the application:
docker run -p 8000:8000 todo_challenge
Local Environment
-
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Navigate to the project's root directory
-
To run the application:
create a super user:
python3 manage.py createsuperuser
-
run migrations:
python3 manage.py makemigrations ```bash python3 manage.py migrate
-
run the server:
python3 manage.py runserver
Swagger Documentation
View the interactive API documentation at http://127.0.0.1:8000/docs/
Testing with Postman You can run all Postman test cases at this link (desktop version is better than online version): https://www.postman.com/gustavo-starwars/workspace/todo-challenge/collection/15918898-6c79a7e3-edd8-4bb3-aefe-9101b256dbb3?action=share&creator=15918898
Running Unit and Integration tests
- Local Environment:
python3 manage.py test
- Docker:
docker exec -it <container_id_or_name> python manage.py test
Note: When testing your endpoints with Postman, please ensure to use the correct URL http://127.0.0.1:8000/ for local environment or http://localhost:8000/ if using Docker, as the base URL for your requests.