Description
In this course, you will learn :
- Setting up a local development server with Docker
- Writing a Python project using Test Driven Development
- Building a REST API with advanced features such as uploading and viewing images
- Creating a backend that can be used a base for your future projects or MVP
- Hands on experience applying best practice principles such as PEP-8 and unit tests
- Configure Travis-CI to automate code checks
Syllabus :
1. App Design
- App overview
- Technologies
- Django project structure
2. Test Driven Development
- What is Test Driven Development?
3. System Setup
- What to install
- Setup confirmation [Follow Along]
4. Project Setup
- Create GitHub project [Follow Along]
- Docker and Django
- Define Python requirements [Follow Along]
- Create project Dockerfile [Follow Along]
- Create Docker Compose configuration [Follow Along]
- Linting and Tests
- Configure flake8 [Follow Along]
- Create Django project [Follow Along]
- Run project with Docker Compose [Follow Along]
5. Configure GitHub Actions
- What is GitHub Actions
- Configuring GitHub Actions
- Create GitHub Actions config [Follow Along]
- Test GitHub Actions [Follow Along]
6. Test Driven Development with Django
- Testing in Django
- Write a test [Follow Along]
- Write a test using TDD [Follow Along]
- Mocking
- Testing web requests
- Common testing problems
7. Configure Database
- Add database service [Follow Along]
- Database configuration with Django
- Install PostgreSQL database adaptor [Follow Along]
- Configure database in Django [Follow Along]
- Fixing database race condition
- Create core app [Follow Along]
- Write tests for wait_for_db command [Follow Along]
- Add wait_for_db command [Follow Along]
- Database migrations
- Update Docker Compose and CI/CD [Follow Along]
8. Create User Model
- The Django user model
- Design custom user model
- Add user model tests [Follow Along]
- Implement user model [Follow Along]
- Normalize email addresses [Follow Along]
- Require email input [Follow Along]
- Add superuser support [Follow Along]
- Test user model [Follow Along]
9. Setup Django Admin
- Write tests for listing users [Follow Along]
- Make Django admin list users [Follow Along]
- Support modifying users [Follow Along]
- Support creating users [Follow Along]
10. API Documentation
- Importance of API documentation
- Auto docs with DRF
- Install drf-spectacular [Follow Along]
- Configure URLs [Follow Along]
- Test Swagger UI [Follow Along]
11. Build user API
- User API design
- Create user app [Follow Along]
- Write tests for create user API [Follow Along]
- Implement create user API [Follow Along]
- Authentication
- Write tests for token API [Follow Along]
- Implement token API [Follow Along]
- Write tests for manage user API [Follow Along]
- Implement manage user API [Follow Along]
- Review user API in browser [Follow Along]
12. Build recipe API
- Recipe API design
- APIView vs Viewsets
- Write test for recipe model [Follow Along]
- Implement recipe model [Follow Along]
- Create recipe app [Follow Along]
- Write tests for listing recipes [Follow Along]
- Implement recipe listing API [Follow Along]
- Write tests for recipe detail API [Follow Along]
- Implement recipe detail API [Follow Along]
- Write tests for creating recipes [Follow Along]
- Implement create recipe API [Follow Along]
- Add additional tests [Follow Along]
- Review recipe API in browser [Follow Along]
13. Build tags API
- Tags API design
- Add tag model [Follow Along]
- Write tests for listing tags [Follow Along]
- Implement tag listing API [Follow Along]
- Write tests for updating tags [Follow Along]
- Implement update tag API [Follow Along]
- Write tests for deleting tags [Follow Along]
- Implement delete tag API [Follow Along]
- Nested serializers
- Write tests for creating tags [Follow Along]
- Implement create tag feature [Follow Along]
- Write tests for updating recipe tags [Follow Along]
- Implement update recipe tags feature [Follow Along]
- Review tags API in browser [Follow Along]
14. Build ingredients API
- Ingredients API Design
- Add ingredient model [Follow Along]
- Write tests for listing ingredients [Follow Along]
- Implement ingredient listing API [Follow Along]
- Write tests for updating ingredients [Follow Along]
- Implement update ingredient API [Follow Along]
- Write tests for deleting ingredients [Follow Along]
- Implement delete ingredient API [Follow Along]
- Write tests for creating ingredients [Follow Along]
- Implement create ingredients feature [Follow Along]
- Write tests for updating recipe ingredients [Follow Along]
- Implement update recipe ingredients feature [Follow Along]
- Refactoring
- Refactor recipe views [Follow Along]
15. Recipe image API
- Recipe image API design
- Add image handling dependencies [Follow Along]
- Static files with Django and Docker
- Configure project for static files [Follow Along]
- Modify recipe model [Follow Along]
- Write tests for uploading images [Follow Along]
- Implement image API [Follow Along]
16. Implement filtering
- Filtering design
- Add tests for filtering recipes [Follow Along]
- Implement recipe filter feature [Follow Along]
- Add tests for filtering tags and ingredients [Follow Along]
- Implement tag and ingredient filtering [Follow Along]
17. Deployment
- Deployment plan
- Django deployment overview
- Add uWSGI to project [Follow Along]
- Create proxy configs [Follow Along]
- Create proxy Dockerfile [Follow Along]
- Handling configuration
- Create docker compose config [Follow Along]
- Update Django settings [Follow Along]
- Creating a virtual server
- Create AWS account and user [Follow Along]
- Upload SSH Key to AWS [Follow Along]
- Create EC2 instance [Follow Along]
- Setup GitHub deploy key [Follow Along]
- Install Docker, Compose and Git [Follow Along]
- Clone and configure project [Follow Along]
- Run service [Follow Along]
- Updating service [Follow Along]