Originally a workout generator made in Flask (Code here), it is now migrated over to Django and also extended with new features such as an API. This project was initially my capstone project for Harvard's CS50 which was improved and extended! Check it out at this site.
These instructions will get you a copy of the project up and running on your local machine.
Using a virtual env (recommended), install dependencies from requirements.txt.
pip install -r requirements.txt
Then, just migrate the databases!
python manage.py migrate
Optional:
python manage.py createsuperuser
to use admin functionalities e.g. edit the database via the api.
Next you'd need to import the exercises themselves which can be found in the repo in workouts.helper.exercises_fin.csv.py. The script read_exercises.py in the helpers directory can just be copy and pasted into a shell:
Open a shell
python manage.py shell
and copy and paste the read_exercises.py contents into the shell.
Champ expects:
- SECRET_KEY - Django secret key
- DEBUG - Debug settings ('True' for debug mode)
- LOCAL_HOST - For running on your machine in dev mode
- EMAIL_ADDRESS
- EMAIL_PASSWORD
- DB_NAME - The name of the database
- DB_USER - Database user
- DB_PASSWORD - Databse password
- DB_HOST - Database location
Champ comes with an API accessed by going to /api. The schema can be seen at /api/schema. There are two main models to see api/exercises/id & api/users/id.
To serve static files make sure Whitenoise is configured properly and run
python manage.py collectstatic
- Django - The web framework used
- Bootstrap 4 - CSS Frontend
- JQuery - UI/UX
- Me, Atsushi Toda - GitHub - My personal website
This project is licensed under the MIT License.