Django x Next.js
Integrate a Django REST API with a Next.js Frontend
- Python and Django web development
- Django Ninja for our Rest API URLs & Schema
- JWT Authentication for Django & Next.js
- User interface with shadcn ui and tailwindcss
- Production database with Neon Postgres
- Deployment for both Django and Next.js to Railway
Lessons
Welcome
3:19
Overview & Requirements
3:04
Demo
7:59
Project Setup
7:06
Hello World with Django Ninja
7:13
User Auth with Django Ninja JWT
11:44
Custom Django Model with Matching Ninja Schema
8:10
Get and List Models via Django Ninja Router
8:53
Your First API request from Next to Django
6:14
Solve CORS Errors from Next to Django
3:08
Get API Data on Page Load with SWR
5:04
Submit Form Data with NextJS
11:00
httpOnly Cookies with Nextjs API Routes
9:27
Data from Nextjs Server to Django Backend
3:30
Auth Token Methods
5:30
Logout Page and API Route in Nextjs
8:20
User Required Requests from Nextjs to Django
9:31
Custom Context Provider and useAuth Hook
8:35
Login Required Redirect for Invalid Auth Tokens
12:14
Install shadcn to Nextjs
9:04
Login Page with shadcn ui
5:56
Base Layout with Navbar
9:38
Navbar Component
9:41
User and Non User Navbar Links
5:45
Waitlist Form and NextJS API Endpoint
9:37
Django Ninja Create Object via POST
4:51
Django Ninja User or Annon User Required
6:38
Django User Foreign Keys
5:09
Decouple Navbar Components
8:46
NextJS API Proxy Class
5:47
NextJS List view as shadcn Table
7:49
Improve API Proxy Class
4:44
Django Form Validation with Django Ninja
14:34
Rendering Django Form Validation Errors in Nextjs
13:36
Nextjs Config for Environments
6:31
Environment Variables in Django
7:03
Deploy Django Project to Railway
13:58
Production Django Database with Neon Postgres
14:52
Prepare our Nextjs Production Build
7:31
Nextjs Production Frontend on Railway
14:31
Dynamic Routing in Nextjs Pages and Routes
10:43
Adding and Updating New Database Fields
15:20
Deployed
5:34
Thank you and thoughts on how practical this is
3:29