A hands-on Django course where you learn by making real things — with AI as your co-pilot. No boring theory dumps. Just code, ideas, and actual websites.
Instagram, Pinterest, Disqus, Mozilla — all built with Django. It's a Python web framework that gives you a database, a backend, an admin panel, authentication, and templating out of the box. You're not assembling Lego bricks from scratch; most of the important bricks already exist.
Frontend (what users see) + Backend (the logic) + Database (the data) + Deployment (getting it online). Django handles the middle two, templates handle the first, and AWS handles the last. This course covers all four.
Django uses a pattern called Model–View–Template. Think of it like a restaurant:
Post has a title, body, and date. Django auto-creates the database table./posts/42/ to the right view function.Stop reading. Open your terminal. Do this now.
Virtual environments keep your project's packages separate from everything else. Always use one.
# Create and activate a virtual env python -m venv venv source venv/bin/activate # Mac/Linux venv\Scripts\activate # Windows # Install Django pip install django django-admin --version # should show 5.x
Always run pip freeze > requirements.txt after installing packages. This lets anyone (including AWS) recreate your exact environment.
One command builds the entire skeleton. We'll make a movie review site called Flickpick.
django-admin startproject flickpick . python manage.py startapp reviews python manage.py runserver
Open http://127.0.0.1:8000 — you should see the Django rocket. 🚀
flickpick/ ├── manage.py # your command center ├── flickpick/ │ ├── settings.py # configuration │ ├── urls.py # URL routing │ └── wsgi.py └── reviews/ # your app ├── models.py ├── views.py └── templates/
A model is a Python class that becomes a database table. No SQL needed.
from django.db import models class Movie(models.Model): title = models.CharField(max_length=200) director = models.CharField(max_length=100) release_year = models.IntegerField() review = models.TextField() rating = models.IntegerField(default=5) # 1–10 created_at = models.DateTimeField(auto_now_add=True) def __str__(self): return f"{self.title} ({self.release_year})"
python manage.py makemigrations python manage.py migrate
Django just created a reviews_movie table in SQLite. That fast.
Django ships with a built-in admin interface. Register your model and get a full CRUD UI for free.
from django.contrib import admin from .models import Movie @admin.register(Movie) class MovieAdmin(admin.ModelAdmin): list_display = ['title', 'director', 'rating', 'created_at'] search_fields = ['title', 'director'] list_filter = ['rating']
python manage.py createsuperuser python manage.py runserver
Visit /admin — log in — add movies. Working backend with zero frontend work.
First the view (logic), then the URL (routing), then the template (HTML).
from django.shortcuts import render, get_object_or_404 from .models import Movie def movie_list(request): movies = Movie.objects.all().order_by('-rating') return render(request, 'reviews/movie_list.html', { 'movies': movies }) def movie_detail(request, pk): movie = get_object_or_404(Movie, pk=pk) return render(request, 'reviews/movie_detail.html', { 'movie': movie })
from django.urls import path from . import views urlpatterns = [ path('', views.movie_list, name='movie-list'), path('movie/<int:pk>/', views.movie_detail, name='movie-detail'), ]
<h1>🎬 Flickpick Reviews</h1> <p>No reviews yet. Add some in the admin!</p>
You now have a working movie review site with a database, admin panel, list page, and detail page. This is the core Django loop: Model → Admin → View → URL → Template. Everything else is a variation.
Django Forms validate, sanitize, and process user input. They prevent common security issues automatically.
from django import forms from .models import Movie class MovieForm(forms.ModelForm): class Meta: model = Movie fields = ['title', 'director', 'release_year', 'review', 'rating'] widgets = { 'review': forms.Textarea(attrs={'rows': 4}), 'rating': forms.NumberInput(attrs={'min':1, 'max':10}), }
Django's built-in auth gives you users, hashed passwords, sessions, login/logout views — all free.
from django.contrib.auth import views as auth_views urlpatterns += [ path('login/', auth_views.LoginView.as_view(), name='login'), path('logout/', auth_views.LogoutView.as_view(), name='logout'), ] from django.contrib.auth.decorators import login_required @login_required def add_review(request): ...
Django's ORM lets you query data using Python. No raw SQL (unless you want it).
# Get all movies rated 8 or above, newest first Movie.objects.filter(rating__gte=8).order_by('-created_at') # Case-insensitive title search Movie.objects.filter(title__icontains='inception') # Get or 404 (use in detail views) movie = get_object_or_404(Movie, pk=42) # All reviews by the current user request.user.movie_set.all()
AI (Claude, GPT-4, etc.) is exceptional at Django. It knows the framework deeply. The trick is learning how to prompt well — bad prompts give vague code, great prompts give deployable code.
Give AI: (1) context about your project, (2) the exact error or goal, (3) the relevant code. Never just say "fix my Django app." That's like asking a doctor "make me healthy" with no symptoms.
I'm building a Django 5 app called [app name]. I need a model called [ModelName] that stores [describe your data]. It should have [list fields and their types]. Add a __str__ method, Meta class with ordering, and register it in admin.py with list_display showing the most useful fields. Also write the migration command.
I'm getting this Django error: [paste full traceback]. My view function is: [paste views.py code]. My model is: [paste models.py]. What's causing this and how do I fix it? Explain why it happened so I don't make the same mistake again.
I have a Django project with this model: [paste model]. Generate a complete feature for [e.g. "user commenting on posts"]. Include: model changes, a class-based view, URL pattern, and a minimal HTML template with form. Use Django best practices.
Create a clean, modern HTML template for a Django [page name]. Use Tailwind CSS via CDN. The template context has: [list variables]. Include a base.html with navbar and footer that this template extends. Make it look like a modern SaaS product page.
Always review AI-generated code before using it. AI can produce working code with subtle bugs, outdated syntax, or security gaps. Treat it like code from a junior developer — useful, but needs your review.
You built something cool. Now let the world see it. We'll use AWS Elastic Beanstalk — it handles servers, load balancing, and scaling automatically. You just push your code.
AWS free tier account · requirements.txt up to date · pip install awsebcli installed
Set DEBUG=False, configure ALLOWED_HOSTS, and collect static files.
Run eb init in your project root. Choose your region and Python platform.
Run eb create flickpick-prod. AWS spins up an EC2 instance automatically.
Use eb setenv SECRET_KEY=... — never hardcode secrets in your code.
Run eb deploy. Every future update is just another eb deploy.
Swap SQLite for PostgreSQL via AWS RDS. Update DATABASES with dj-database-url.
import os, dj_database_url DEBUG = os.getenv('DEBUG', 'False') == 'True' ALLOWED_HOSTS = [os.getenv('ALLOWED_HOST', 'localhost')] SECRET_KEY = os.getenv('SECRET_KEY', 'dev-only-key') DATABASES = { 'default': dj_database_url.config( default='sqlite:///db.sqlite3' ) } MIDDLEWARE += ['whitenoise.middleware.WhiteNoiseMiddleware'] STATIC_ROOT = BASE_DIR / 'staticfiles'
I'm deploying a Django 5 app to AWS Elastic Beanstalk. I'm getting this error in eb logs: [paste error]. My settings.py has: [paste relevant settings]. What's wrong and how do I fix it step by step?
These aren't boring tutorial apps. Each one is a real product people would actually use. Build them to learn — keep them to show employers.
Rate, review, and discover movies. Add a watchlist, star ratings, and shareable review links. You already know 80% of it!
Users create quizzes with multiple-choice questions. Others take them and get instant scores. Add a leaderboard. Wildly replayable.
Product listings, a shopping cart (sessions), checkout flow, and order history. Integrate Stripe for real payments. Actually sell something.
Users submit links with titles and tags. Others upvote them (like Hacker News). Show trending content with vote counts.
Service providers post availability. Clients book slots. Automatic email confirmations. Real-world utility from day one.
Django Channels + WebSockets = real-time chat. Public rooms, private DMs, typing indicators, online status. Actually impressive on a CV.
Post recipes with ingredients, steps, and photos. Follow other cooks, save favourites, leave ratings. Add "I made this" photos.
Users post local spots (cafés, skate parks, hidden gems) with map pins. Browse spots nearby using the Google Maps API.
Users submit questions. Your Django backend calls the Claude or OpenAI API and streams the answer back. Save Q&A pairs, let users rate answers.
The best framework docs in existence. Read the tutorial, then the "How-to" guides.
William S. Vincent's book series — Beginners → Intermediate → APIs. Worth every page.
Once you want a mobile app or React frontend talking to Django, DRF is the bridge.
Real-time features via WebSockets. Unlocks a whole new class of apps.
The best practices bible. Read after your first two projects — it will all click.
Before deploying, run python manage.py check --deploy. Then read OWASP Top 10.
They finish things. Deploy something — even if it's imperfect. A live, imperfect app teaches you more than a perfect half-finished one ever will.