Build a Backend REST API with Python & Django – Advanced

docker-compose run –rm app sh -c “flake8”
docker-compose run –rm app sh -c “django-admin startproject app .”
docker-compose up

Configure GitHub Actions
– Create GitHub Actions Config
— Create folder under root
.github\workflows
— Create config file
checks.yml

– Configure Docker Hub Credentials
— Login to Docker Hub
— Personal Access Token
generate Access Token

— Login to GitHub
goto recipe-app-api project
click on settings
click on Secrets and varibles
click on Actions
click on Secrets tap
click on New repository secret

— Commit and Push to GitHub
git add .
git commit -am “Fix something”
git push origin

Test Driven Development with Django
— Run Test
docker-compose run –rm app sh -c “python manage.py test”

docker-compose down

docker-compose build

docker-compose run –rm app sh -c “python manage.py startapp core”

docker-compose run –rm app sh -c “python manage.py test”

docker-compose run –rm app sh -c “python manage.py wait_for_db”

docker-compose run –rm app sh -c “python manage.py wait_for_db && flake8”

Leave a Reply

The maximum upload file size: 500 MB. You can upload: image, audio, video, document, spreadsheet, interactive, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here