This project is a RESTful API built with Python, Django, and Django REST Framework to manage a gym's memberships and classes. Setting up a project using Docker for containerization and Postgresql for data storage. Developed in spirit in the of TDD. Test written mostly in unitest, django.tests and with rest_framework.test. Added endpoints for creating and managing users, tags, exercises, plans. Possiblity to upload images of user. For profile, as a trainer or client. Prepared code for server deployment. I have enjoyed this, especially creating whole code with TDD.
To get started with this project, you'll need to have Docker and Docker Compose installed on your machine. You can download them here.
Once you have Docker and Docker Compose installed, clone the repository to your machine:
git clone https://github.com/Mgalazyn/gym_api-drf.git
Change into the project directory:
cd gym_api-drf
pip install -r requirements.txt
Create a file called .env and add the following environment variables:
DEBUG = 1
DB_HOST= your_db_host
DB_NAME= your_db_name
DB_USER= your_db_user
DB_PASS= your_db_password
SECRET_KEY= your_secret_key
Build and run the Docker containers:
docker-compose up -d --build
To run tests, run the following command
docker-compose app --rm run sh -c 'python manage.py'