Ready to Start Learning?

Sign in to check if you already have access, or get started with a purchase or membership.

Content Engine

Use AWS S3 with Django to manage unlimited videos, images, and other files.

0:00
1/18/2024
Learn how to build a Django-powered content engine that leverages AWS S3 for nearly unlimited amount of stored videos, images, files, and more. This content engine will also be extra private and secure thanks to Twingate's effective approach to sharing assets behind a next-generation private network.
We start by automating the process of containerizing our Django application without writing a single Dockerfile. This means, we just focus on our code without learning Docker much like you would with a PaaS (e.g. Heroku). This is possible thanks to the great cloud-native tool known as Buildpacks and it's simple on GitHub Actions.
With Kubernetes and Twingate, we will provide provide and secure local access to any resource we decide: Django project, databases, and much more depending on what containerized-app you want to use.
Once this foundation is laid, we'll build out our Django project using cutting edge tools like HTMX and TailwindCSS to provide a fast, functional, and effective way to deliver a modern user experience without the overhead of writing JavaScript or CSS.
The last major piece is getting large file uploads to work. This means we'll be learning all about how to use the official Amazon S3 package for Python known as Boto3. With Boto3, we will pre-sign files so we can download them, upload them, and delete them. In addition to Boto3, we write pure JavaScript to handle the uploading process (using functions like Fetch and XMLHttpRequests).
This course is a juggernaut and we are excited to share it with you. And guess what? Thanks to Twingate, this entire course is already yours (just login and add it to your library).
Are you ready to begin? Let's do this!

References

Helpful Resources

Content Engine

Lifetime access to this course

or get access to 500+ courses with a membership

Sections

1

Welcome & Demo

0:00

2

Requirements

0:00

3

Why we use Django in Containers

0:00

4

Automate Django as a Container

0:00

5

Setup Local Django Environment

0:00

6

Why we use Kubernetes

0:00

7

Provision Kubernetes Cluster

0:00

8

Your First Running Container on Kubernetes

0:00

9

Environment Variables with ConfigMaps

0:00

10

Env Vars with K8s Secrets

0:00

11

The Kubernetes Way of Doign SSH

0:00

12

Multiple Pods & K8s Selectors

0:00

13

Managing Pods with Deployments

0:00

14

Serve External Traffic with K8s Services

0:00

15

Update Django Project and Rollout Changes

0:00

16

GitHub Actions Workflow for Kubectl

0:00

17

GitHub Actions as our Secrets Manager

0:00

18

Setup Twingate Network and Client

0:00

19

Integrate Twingate with Kubernetes via Connectors

0:00

20

Your First Twingate Resource

0:00

21

K8s Service DNS + Twingate

0:00

22

Postgres DBs via Twingate and Kubernetes

0:00

23

Loading Env Vars with Python Decouple

0:00

24

Integrate Postgres + Django

0:00

25

Verify Postgres with our K8s Deployment

0:00

26

Django Static Root and Auto Containers

0:00

27

Implement Whitenoise in Django

0:00

28

Using Tailwindcss, Flowbite & Django

0:00

29

The Content Engine Freatures

0:00

30

Our Project Model

0:00

31

Override Save to Generate Slug Handle

0:00

32

Unique Slugify For SlugFields

0:00

33

Project Activation Views

0:00

34

Custom Middleware for request_project

0:00

35

Caching with Middleware for Project Activation

0:00

36

Items for Projects

0:00

37

Item Model Form and Create View

0:00

38

Styling Django Forms the TailwindCSS Way

0:00

39

Item List and Detail View

0:00

40

Item Update View

0:00

41

Item Delete View

0:00

42

Project CRUD Views

0:00

43

Cleaning Up Project CRUD

0:00

44

Flowbite Navbar

0:00

45

Context Processor to View Projects

0:00

46

Activate Project Methods

0:00

47

Dashboard Table View

0:00

48

Project Required Decorator

0:00

49

Dynamic QuerySet Loading with HTMX

0:00

50

HTMX for Rendering Django Forms

0:00

51

Handling Django Forms with HTMX

0:00

52

Custom HTMX Trigger Event

0:00

53

Integrating HTMX with TailwindCSS

0:00

54

Delete Items with HTMX

0:00

55

Inline Row Edit with HTMX

0:00

56

Status Field with Django TextChoices

0:00

57

Dynamic Status Dropdown Select

0:00

58

Saving Dynamic List View Changes with HTMX

0:00

59

Amazon Web Services S3 Bucket and IAM Permission Setup

0:00

60

Integrating Python with S3 Buckets Using Boto3

0:00

61

Display S3 Objects via HTMX

0:00

62

View Bucket Contents via Presigning S3 Objects

0:00

63

Delete S3 Object with HTMX and Boto3

0:00

64

Presign File for Uploading to S3 Via Boto3

0:00

65

XMLHttpRequest for Upload and Progress

0:00

66

Upload Form in Item Detail View

0:00

67

Granting Access to Users

0:00

68

Project User through ManyToMany

0:00

69

Custom QuerySet for User Access

0:00

70

Thank you

0:00

Content Engine - Coding for Entrepreneurs