MENU

Fun & Interesting

Python Tutorial: Build a SaaS App with Django, Stripe, Neon PostgreSQL, TailwindCSS, GitHub Actions

CodingEntrepreneurs 219,287 11 months ago
Video Not Working? Fix It Now

⭐️ Sign up for Neon right now! https://neon.tech/cfe Topics: ✅ Python web development with Django ✅ Sending Emails with Gmail ✅ Django AllAuth + GitHub Login ✅ Deploy to Railway (https://kirr.co/qysgeu) ✅ Integrate Neon Postgres ✅ Django Groups and User Permissions ✅ Django + Stripe Integration ✅ Stripe reoccurring payments via Products/Prices API ✅ Django Management commands to sync Users subscription status with correct permissions ✅ Django management commands for pulling vendor css/js (tailwind/flowbite) for container-based builds ✅ Django with whitenoise ✅ Scheduled GitHub Actions Workflows to sync prod database with stripe status (e.g replacing a Celery beat server) ✅ Using Neon Branching for Postgres in GitHub Actions to leverage production data without touch production data ✅ Python Decouple for env vars ⭐️ Thank you to Neon for sponsoring this course - sign up at https://neon.tech/cfe 🚀 Enroll now on https://cfe.sh/enroll 🚀 💽 Code: https://github.com/codingforentrepreneurs/SaaS-Foundations 💽 Blog on Deploy Django on Railway with Dockerfile: https://kirr.co/2sn6eg 💽 Secret Key for Django [blog post](https://www.codingforentrepreneurs.com/blog/create-a-one-off-django-secret-key/) 📽️ Chapters 00:00:00 Welcome 00:00:33 Overview 00:06:10 What you need to know 00:08:19 Start Django Project 00:18:57 Your First HTML Webpage with Python Functions 00:28:27 Rending HTML Documents 00:33:33 Using Django Templates 00:43:46 Django Template Inheritance, Conditions, & Include 00:53:39 Store and Retrieve Data Part 1 01:03:59 Store and Retrieve Data Part 2 01:11:17 Push to GitHub via Git 01:18:12 Prepare for Production Environment 01:25:28 Deploy Django to Railway with Docker Containers 01:41:57 The Hard Way to Manage Environment Variables 01:48:00 dotenv and Python Decouple to Manage Environment Variables 01:56:33 Provision a Serverless PostgreSQL Database with Neon 02:03:50 Integrate PostgreSQL with Django 02:11:21 Neon in Production + Database Branching 02:18:06 Styling with CDN for TailwindCSS and Flowbite 02:25:42 Configure Django Static Files in Dev 02:38:57 Download Url to Local File Helper Function 02:43:16 Custom Django Management Command to Pull Vendor Files 02:55:06 Missing Args with Container Build in Railway 03:01:19 Using WhiteNoise to Serve Django Static Files 03:12:09 Configure Django to use Email with Gmail 03:22:15 Django Admin User + User Passwords 03:33:20 Django Login View Logic 03:41:45 HTML Login Form and Template 03:52:46 Register Users the Hard Way 04:03:19 Configure Django AllAuth 04:15:10 User Email Verification with Django AllAuth 04:17:25 Better UI for Django AllAuth 04:28:24 Navbar Links for Auth 04:35:31 Login with GitHub via Django AllAuth 04:44:20 Password Protected Page with Django Sessions 04:52:22 User-required Pages via login_required Decorator 04:55:43 Staff User Required 05:01:22 User Profile View 05:09:43 User Permissions and has_perm 05:20:32 User Permissions in Django Templates 05:29:45 Groups & Group-level Permissions 05:33:18 Custom Permissions for Django Users 05:41:27 Groups and Permissions within Subscriptions 05:49:07 Syncing Subscription Groups and Permissions 05:56:35 Sync User Subscription with the User Group Part 1 06:02:58 Sync User Subscription with the User Group Part 2 06:12:41 Getting Started with Stripe 06:19:49 Django Customer Model 06:24:48 Override Django Save to Create Stripe Customer 06:37:10 Django All Auth Signal to Confirm Django Stripe Customers 06:51:40 Our Django Subscription Model as a Stripe Product 06:57:01 Subscription Price Model 07:09:33 Manage Prices in Django Admin with Tabular Inlines 07:15:41 Featured and Ordered Pricing 07:24:26 Subscription Pricing View & Template 07:29:39 Pricing Table based on QuerySets 07:42:16 Pricing Interval Toggle Views 07:50:26 A Django Session Based Checkout Process 08:01:55 Stripe Checkout Session 08:12:57 Stripe Checkout Finalize View in Django 08:22:27 Successful Purchase to User Subscription Model 08:35:03 Auto Cancel Subscription on New Plan 08:44:54 Adding Subscription Billing Period Dates 08:58:20 User Subscription Status Field 09:04:59 User Subscription View and Refresh 09:18:16 User Subscription Cancel View 09:30:35 Cancel Dangling User Subscriptions 09:41:21 Custom Django Management Command with Arguments 09:47:23 Subscription Refresh Utility Function 09:56:40 Custom Django Model QuerySets and Model Managers 10:05:03 Filtering Django Models with Datetime Objects 10:18:57 Hello World from GitHub Actions 10:28:45 Testing Django Basics with GitHub Actions 10:35:18 Environment Variables in GitHub Actions 10:41:00 Github Actions Secrets for Database URL 10:47:38 Branch Neon DB for Django Tests 11:01:41 Scheduled Production Worker with Django Neon Stripe and GitHub Actions 11:18:00 A Better Landing Page with Flowbite 11:27:19 Using the SaaS Theme to Fix Missing Tailwind Classes 11:31:39 Dashboard View 11:37:12 Dashboard View 11:49:13 Thank you and next steps

Comment