- Activate the virtual environment:
venv/Scripts/Activate
(In case you don't have it, create a new one:python -m venv venv
) - Install all the necessary packages from the requirements.txt file:
pip install -r requirements.txt
- Run the local server with the manage.py file located in the backend folder:
python manage.py runserver 8000
- To create a new client, enter to POSTMAN and send a POST request to the url: localhost:8000/clientes/
- To see this recently created client and the list of clients, enter to POSTMAN and send a GET request to the url: localhost:8000/clientes/
- To update the data of the 1st client, enter to POSTMAN and send a PUT request to the url: localhost:8000/clientes/1/update/
- To check these changes in the list of clients, enter to POSTMAN and send again a GET request to the url: localhost:8000/clientes/
- To delete the 1st client, enter to POSTMAN and send a DELETE request to the url: localhost:8000/clientes/1/delete/
- To check if the 1st client was deleted, enter to POSTMAN and send again a GET request to the url: localhost:8000/clientes/
-Also to check field validations we can send a POST request with blanks and wrong formats:
... and the API will ask you to enter valid fields: