Python Django Custom Authentication with Email Verification - Complete Project Tutorial
Piko Can Fly
@pikocanflyAbout
I like making things easier.
Video Description
In this step by step tutorial we’ll learn how to create an email verification system in Django from Scratch. We will not use any external libraries or frameworks for authentication, instead we will create everything ourselves; we will make our own token generator, custom generator form, Activation email and view that checks the validity of the tokens and handles the activation status of user accounts and much much more. The goal is to provide a clear and comprehensive guide. Throughout this tutorial, we'll cover essential aspects of the implementation; we will create our own token generator, custom generator form, activation email and views that checks the validity of the tokens and handles the activation status of user accounts and much much more. My goal when making this tutorial is to make the whole process as clear and complete as possible. You can access and download the code file from my Patreon page: https://www.patreon.com/PikoCanFly Chapters: 00:00 - What will do 00:22 - Create Directory 00:33 - Create Python .venv Environment 00:50 - Install Django 01:21 - start new django project + runserver + run migrations Configure Email Settings: 02:25 - Create .env to keep environment variables - such as email address and password 03:07 - Install and use Python dot env (python-dotenv) to load environment variables 03:30 - Configure Django email settings for sending emails using the SMTP server Token Generator: 5:40 - Create tokens.py 5:54 - Define Token Generator Function that inherits from PasswordResetTokenGenerator Registration Form: 07:11 - Create forms.py 08:13 - Define Class Registration form that inherits from Django’s UserCreationForm Views: 09:47 - Create views.py 09:58 - Define Registration View that has logic for email message including sending the verification email 16:53 - Define Index view 17:38 - Define Activate View + logic to decode token and activate users URLS 21:55 - define URL patterns Templates: 23:40 - Create templates dir + add path in settings.py 24:45 - create base-template file + Add HTML boilerplate 28:31 - Create Register template followed by Login template 30:15 - Activation Email Template 31:49 - Redirect to index upon Login 32:16 - Add Path to Static Directory in settings.py 34:09 - Add CSS styling 34:58 - Style message according to tag ----- If you're considering hosting your app on DigitalOcean, it’d be awesome if you used my referral link! You'll get $200 in free credits, and I'll get $25. Here is the link: https://m.do.co/c/58e570dc13ea #Python #Django #tutorial #authentication #email #verification
Web Dev Must-Haves
AI-recommended products based on this video

Pishengfa DIY Stitch Book, Embroidery Stitch Book, DIY Sewing Books, EmbroideryS Books of Stitches, with 86/128 Sewing Tips for Beginners, Unique Embroidery Handmade Gifts (Grey)

Laptop Sleeve Case 11–14 Inch MacBook Air MacBook Pro Surface Laptop Dell XPS 13 HP Envy Pavilion Lenovo Yoga Slim IdeaPad Acer Swift Chromebook Samsung Galaxy Book Shockproof Leather Bag Colour Blue

Gumdrop ProTech Case for Dell New XPS 13 Plus 9320 Laptop- Slim Lightweight Case with Energy Displacement Protection, Non-Skid Rubber Feet and Frosted Exterior for Bumps and Drops (Black)

65W 45W USB C Laptop Charger Compatible with Dell Latitude 5420 5430 5520 5530 7340 7430 Inspiron 14 16 XPS 13 Chromebook 3100 Dell Computer Type C Fast Charging AC Adapter Power Cord

Charger for Dell Computer Inspiron XPS Laptop 65W 45W Power Supply AC Adapter for Dell-Inspiron 15-3000 15-5000 15-7000 11-3000 13-5000 13-7000 17-5000 XPS 13 Series 5559 5558 5755 5758 Laptop Charger

UGREEN Revodok USB C Hub, 5-in-1 USB C Adapter with 4K HDMI, 100W Power Delivery, 3 USB A Data Ports, Multiport USB Hub for MacBook Pro/Air, iPad Pro, Surface, XPS, Thinkpad, Galaxy and More, Gray

UGREEN USB to USB C Adapter & USB C to USB Adapter Combo 4-Pack, 10Gbps Type-C Converter, Car Charger Compatible with MacBook Pro, iPad Mac mini, iPhone 17/16, Galaxy, PC/Laptop, Hard Drive Enclosure

UGREEN 130W Car Charger USB C Fast Charger PD3.0 QC4.0 PPS Fast Charging Car Adapter with 100W USB C Cable Compatible with Dell XPS, MacBook, iPhone 16 15 14 Pro Max, Galaxy S25 S24 Ultra, iPad Pro

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Syntech Link Cable Compatible with Meta/Oculus Quest 3S/Quest 3/Quest2/Pro/Pico 4/Ultra and PC/SteamVR, 16FT Upgraded Type C Cable with USB 3.0 Adapter, High Speed Data Transfer Cord for VR Headset

Syntech Link Cable 16FT for PCVR Compatible with Oculus/Quest 3/Meta Quest 3S, Quest2/Pro/Pico 4/Ultra Accessories and PC/SteamVR, High Speed PC Data Transfer, USB 3.0 to USB C Cable for VR Headset

Cmokifuly GMK67 65% Mechanical Keyboard Kit Tri-Mode South-Facing RGB LED for 3/5pin Switches,66 Keys+1 Knob Hotswap Socket PCB Gasket Mounted Plate Gaming DIY Keyboard Kit (White)

5 Pcs Adult Keyboard Clicker Toys, Portable Mechanical Keyboard Keychain Toy, Decompression Toys, Funny Cube Key Button Stress Relief for Adults Present to Relief Pass Time

Asus ROG Azoth Wireless Mechanical Gaming Keyboard – 75% TKL, Tri-Mode Connectivity, Hot Swappable Pre-lubed ROG NX Snow Linear Switches, PBT Keycaps, RGB, OLED Display, PC/Mac Support - Black

TMKB 60% Mechanical Gaming Keyboard, Brown Tactile Switch, LED Backlight, Anti-Ghosting, Detachable USB-C, Double-Shot Keycaps, 61 Keys, Wired, White
![2 Pack Apple Earbuds iPhone Headphones Wired Lightning Earphones [Apple MFi Certified] (Built-in Microphone & Volume Control) Noise Isolating with iPhone 14/13/12/11/XR/XS/7/821551-8 Interlocking Case](https://m.media-amazon.com/images/I/51UTScjzmCL._AC_UL960_FMwebp_QL65_.jpg)
2 Pack Apple Earbuds iPhone Headphones Wired Lightning Earphones [Apple MFi Certified] (Built-in Microphone & Volume Control) Noise Isolating with iPhone 14/13/12/11/XR/XS/7/821551-8 Interlocking Case

3 in 1 Multi Functional Vegetable Peeler for Kitchen, with Bottle Opener, Cutter Shred and Ergonomic Wood Handle - Effortlessly Peel Potato, Apple, Pineapple, Carrot (2 PCs)
![iPhone 16 15 Charger [Apple MFi Certified] 2 Pack USB C Wall Charger Block 6FT USB C to Type C Cable Compatible with iPhone 16 15 Pro Max,16e, AirPods Pr, iPad Pro12.9/11, Samsung/Android Phones](https://m.media-amazon.com/images/I/51GjkZn3ACL._AC_UL960_FMwebp_QL65_.jpg)
iPhone 16 15 Charger [Apple MFi Certified] 2 Pack USB C Wall Charger Block 6FT USB C to Type C Cable Compatible with iPhone 16 15 Pro Max,16e, AirPods Pr, iPad Pro12.9/11, Samsung/Android Phones

Apple AirPods Pro 2 Wireless Earbuds, Bluetooth Headphones, Active Noise Cancellation, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black


![Python Django Custom Authentication : Login, Logout & Registration | Beginner Friendly Tutorial [6]](https://imgz.pc97.com/?width=500&fit=cover&image=https://i.ytimg.com/vi/aCWd4loTl68/hqdefault.jpg)

![How to Deploy a Django Project on Python Anywhere with MySQL Database [free] | Live Coding Tutorial](https://imgz.pc97.com/?width=500&fit=cover&image=https://i.ytimg.com/vi/1nBhFUF6aQ0/hqdefault.jpg)


