Python Tutorial: Build a Course Platform with Django, HTMX, TailwindCSS and Cloudinary.

CodingEntrepreneurs • September 19, 2024
Video Thumbnail
CodingEntrepreneurs Logo

CodingEntrepreneurs

@codingentrepreneurs

About

Learn, Build, and Earn. Coding Entrepreneurs is here to help you learn the skills you need to build the projects you want. Learn by doing everything we do step-by-step. Practical and hands-on. Let's do this. 💽 Code: https://github.com/codingforentrepreneurs 🚀 Enroll. Learn to code. Launch your project: https://cfe.sh/enroll 🚀

Video Description

🚀 Sign up for Cloudinary for free right now: https://cld.media/cfe 🚀 Learn how to build a Course Platform from scratch. Host video-based courses, manage thumbnails, restrict access to confirmed emails only, optimize thumbnails, customize the Django admin and much more. Topics: ✅ Use Python 3.12 and Django 5 ✅ Learn image upload basics with Django (plus the challenges with hosting images) ✅ Integrate Cloudinary Image & Hosting ✅ Optimize images sizes with a simple argument with thumbnails and large format ✅ Build an Email-first opt-in workflow ✅ Automatically resize videos to fit playback ✅ Custom email verification process from scratch ✅ Integrate TailwindCSS with django-tailwind ✅ Use HTMX to render and handle Forms ✅ Send Emails from Django with Gmail ✅ Customize the Django Admin to fully manage and view videos and courses ✅ Implement custom helper functions that can be re-used across Python projects ✅ Stylize the frontend using Flowbite ✅ Use the CloudinaryField on Django models to automatically handle images and videos ✅ and much more ⦿ Blog post - Send Email with Gmail & Django: https://www.codingforentrepreneurs.com/blog/sending-email-in-django-from-gmail ⦿ Code: https://github.com/codingforentrepreneurs/course-platform ⦿ Subscribe: https://cfe.sh/youtube ⦿ Setup Video for Python 3 & Django 3: https://youtu.be/e5o1miB0nyk Thanks to Cloudinary or partnering with us on this video. Sign up for free this one: https://cld.media/cfe Chapters 00:00:00 Welcome 00:00:51 Demo 00:06:39 Python Virtual Environment 00:10:24 Create the Django Project 00:15:53 Course Roadmap 00:21:05 Baseline Django Course Model 00:34:31 Django ImageField and Pillow 00:37:21 Syncing Code with Migrations 00:48:03 Django Admin to Manage Course Model 00:52:31 Handling Image Uploads in Development 01:01:12 How Django Manages Image Uploads 01:06:03 Configure Cloudinary for Django 01:13:48 Using the CloudinaryField for Django Image Hosting 01:17:22 Customize the Django Admin to Render HTML Images 01:22:56 On Demand Image Adjustments with Cloudinary Images 01:27:29 Model Methods for Image Sizes 01:33:18 Understanding Foreign Keys with the Lesson Model 01:42:18 Lesson Publish Status and Preview 01:45:03 Cloudinary Video + Thumbnail Fields for Lessons 01:48:26 Foreign Key Stacked Model Admin 01:50:23 Ordering with a Model Field 01:56:57 CloudinaryField Upload Options 02:06:09 Generate a Public ID Field 02:17:23 Reusable CloudinaryField Functions 02:28:25 Decoupling Cloudinary Helper Services from Models 02:42:07 Get Cloudinary Video Object Service 02:46:33 Signed Private Video URL in Admin 02:49:01 Embed Cloudinary Video with Pure HTML 02:54:10 Using Django Templates to Render Video 03:02:28 Using JavaScript for Video Embed Basics 03:09:30 Django & the Cloudinary Video Player 03:15:51 Override Django Admin Templates 03:23:53 Render Multiple Videos in One Page 03:29:02 View Logic and Database Lookup Services 03:37:50 URL View Routing for Database Lookups 03:48:04 Public ID As URL Path Lookups 03:53:25 Rendering Templates from Views 04:03:43 Render the Course List View 04:13:11 Course Detail View and Template Snippets 04:19:40 Lesson QuerySet for Different Status Values 04:29:57 Lesson Detail View 04:35:29 Render the Video Player for Users 04:43:56 Configure Django to Send Email with Gmail 04:52:19 Email Verification Models 04:58:32 Create the Email Model Form 05:02:43 Handing HTML Forms with Django 05:08:35 Rendering a Django Model Form 05:14:35 Email Validation & Verification Event 05:21:02 Email Verification Event Service 05:26:02 Send Email from Verification Event 05:34:37 Unique Verify Link with UUID 05:39:18 Verify Confirmation Token Service 05:50:58 Enrich the Session With Verified Email ID 05:57:28 Email Required on Lesson Detail View 06:04:27 Using HTMX To Dynamically Load Forms 06:13:02 HTMX with POST Data 06:19:34 Using HTMX to Handle Logout 06:24:35 But Why Tailwind with Django 06:28:51 Install django-tailwind 06:43:34 Setup Flowbite with django-tailwind 06:51:02 Login & Logout Views 06:56:13 Tailwind and the HTMX-Driven Login Form 07:01:16 Improved Course List View 07:07:13 List View with Thumbnail Images 07:17:06 Video Frame as Lesson Thumbnail 07:19:31 Base Template CSS Spacing 07:22:08 Course Detail View 07:28:32 Improved Unlock Content Page 07:30:02 Improved Homepage 07:35:51 Thank you 07:36:35 Next up

You May Also Like

Instant Home Decor Upgrades

AI-recommended products based on this video

Loading...
RoboSeal Rechargeable Mason Jar Vacuum Sealer for Mason Jars Wide and Regular, One Touch Vacuum Sealer for Jars, 10 Lids Included, Digital Battery Indicator, As Seen on TV

RoboSeal Rechargeable Mason Jar Vacuum Sealer for Mason Jars Wide and Regular, One Touch Vacuum Sealer for Jars, 10 Lids Included, Digital Battery Indicator, As Seen on TV

(190)
$36.09
Prime
2K+ bought in past month
Loading...
Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

(786)
$69.15$33.51
FREE delivery Jun 13 - 17
Loading...
Retekess TR618 Shortwave Radio, AM FM Radio Portable, Transistor Radio Battery Operated with Earphone Jack, Portable Radio with LCD Display(Black)

Retekess TR618 Shortwave Radio, AM FM Radio Portable, Transistor Radio Battery Operated with Earphone Jack, Portable Radio with LCD Display(Black)

(393)
$61.99
FREE delivery Sun, Aug 10
Loading...
Nileole 2 Decks Automatic Card Shuffler, Battery Operated Electric Shuffler, Casino Card Game Table Accessories for Travel, UNO, Phase 10, Skip-Bo, Texas Hold'em, Home Card Games
Best Seller

Nileole 2 Decks Automatic Card Shuffler, Battery Operated Electric Shuffler, Casino Card Game Table Accessories for Travel, UNO, Phase 10, Skip-Bo, Texas Hold'em, Home Card Games

(2,608)
$22.99
FREE delivery Sat, Jun 14 on your first order
Loading...
Cordless Pressure Washer with Faucet Adapter, Handheld Pressure Washer Battery Operated, Built-in 3600mAh Battery, Cordless Power Pressure Washer, for Courtyards, Farms, Exterior Walls

Cordless Pressure Washer with Faucet Adapter, Handheld Pressure Washer Battery Operated, Built-in 3600mAh Battery, Cordless Power Pressure Washer, for Courtyards, Farms, Exterior Walls

(0)
$37.05
$8.99 delivery Jun 25 - Jul 8
Loading...
TOPTHY Perfume Travel Spray Bottle Atomizer - 5ML Atomizer Perfume Bottle, Scent Pump Case, Luxury Leakproof Refillable Perfume Spray Bottle for Women and Men(Champagne Gold)

TOPTHY Perfume Travel Spray Bottle Atomizer - 5ML Atomizer Perfume Bottle, Scent Pump Case, Luxury Leakproof Refillable Perfume Spray Bottle for Women and Men(Champagne Gold)

(30)
$8.99
FREE delivery Sat, Jun 14 on your first order
Loading...
100FT Garden Hose - 2025 New Version Expandable Garden Hose with 10 Function Spray Nozzle, 3/4" Brass Fittings and 4-Layer Latex Core, Lightweight, Durable, No-Kink Flexible Water Hoses (Black Gold)

100FT Garden Hose - 2025 New Version Expandable Garden Hose with 10 Function Spray Nozzle, 3/4" Brass Fittings and 4-Layer Latex Core, Lightweight, Durable, No-Kink Flexible Water Hoses (Black Gold)

(132)
$53.95
FREE delivery Sun, Jun 22
1K+ bought in past month
Loading...
50FT Garden Hose - 2025 New Version Expandable Garden Hose with 10 Function Spray Nozzle, 3/4" Brass Fittings and 4-Layer Latex Core, Lightweight, Durable, No-Kink Flexible Water Hoses (Black Gold)

50FT Garden Hose - 2025 New Version Expandable Garden Hose with 10 Function Spray Nozzle, 3/4" Brass Fittings and 4-Layer Latex Core, Lightweight, Durable, No-Kink Flexible Water Hoses (Black Gold)

(112)
$33.95
FREE delivery Sun, Jun 15 on your first order
2K+ bought in past month
Loading...
Command Medium Picture Hanging Strips [Removable]: 12 Pairs (White)

Command Medium Picture Hanging Strips [Removable]: 12 Pairs (White)

(23,669)
$10.38
FREE delivery Mon, Sep 15 on your first order
5K+ bought in past month
Loading...
LEGO Icons Bonsai Tree Building Set - Artificial Bonsai Tree Plants for Home Decor, Adults Ages 18+ - Faux, Fake Plants for Table, Desk, Office - Birthday Gift for Men & Women - 10281

LEGO Icons Bonsai Tree Building Set - Artificial Bonsai Tree Plants for Home Decor, Adults Ages 18+ - Faux, Fake Plants for Table, Desk, Office - Birthday Gift for Men & Women - 10281

(22,441)
$59.99
PrimeFREE delivery Sat, Jun 14
600+ bought in past month
Loading...
Paint Your Own Moon Lamp Kit, DIY 3D Moon Night Light with Space Figurines & Wooden Stand, Art Supplies Creativity Arts & Crafts Kit for Kids, Toys Girls Boy Birthday Easter Gift Ages 3 4 5 6 7 8 9 10 11 12+

Paint Your Own Moon Lamp Kit, DIY 3D Moon Night Light with Space Figurines & Wooden Stand, Art Supplies Creativity Arts & Crafts Kit for Kids, Toys Girls Boy Birthday Easter Gift Ages 3 4 5 6 7 8 9 10 11 12+

(2,309)
$19.99
FREE delivery Sat, Jun 14 on your first order
400+ bought in past month
Loading...
Sunrad Foil Art Kit for Kids Unicorns & Princesses Arts and Crafts, No Mess Art for Kids, Fun Craft Kits & Supplies, DIY Creative Activities, Travel Toys Gifts for Girls & Boys Ages 4 5 6 7 8 9+

Sunrad Foil Art Kit for Kids Unicorns & Princesses Arts and Crafts, No Mess Art for Kids, Fun Craft Kits & Supplies, DIY Creative Activities, Travel Toys Gifts for Girls & Boys Ages 4 5 6 7 8 9+

(162)
$23.99$19.72
FREE delivery Sat, Jun 14 on your first order
100+ bought in past month
Loading...
Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

(32)
$8.99
FREE delivery Wed, Mar 25 on your first order
Loading...
Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

(34)
$8.70
FREE delivery Fri, Feb 13 on your first order
300+ bought in past month