Django
Curriculum
Django · Python web

Django Tutorial

A complete Django web framework path from beginner to pro - build real apps with models, views, templates, auth, and deployment. Python web development, taught step by step.

65 lessonsBeginner → ProBackend
Start from the beginning

Curriculum

Work through each section in order. Every lesson ends with practice and key points so the idea sticks.

Beginner

Getting Started

5 lessons · ~50 min
  1. 1
    What is Django?

    Learn what Django is, what it includes, and why it is a popular framework for building Python web applications.

  2. 2
    Django vs Other Python Web Options

    Compare Django with Flask, FastAPI, and smaller Python web tools so you know when Django is a good choice.

  3. 3
    Install Django & Create a Project

    Install Django 5.x in a virtual environment and create your first project with django-admin startproject.

  4. 4
    Project Structure Explained

    Understand the files created by django-admin startproject and where your Django code belongs.

  5. 5
    runserver, Settings & Apps

    Run the development server, register apps, and understand the settings that make Django project pieces work together.

Beginner

Core Ideas

3 lessons · ~31 min
  1. 6
    MTV Architecture (Model-Template-View)

    Learn Django MTV architecture and how models, templates, and views work together to create pages.

  2. 7
    URLs & Routing

    Map browser paths to Django views using project URL files, app URL files, path converters, and named routes.

  3. 8
    Function-Based Views

    Write beginner-friendly Django views with Python functions, HttpResponse, render, request data, and context dictionaries.

Beginner

Templates

4 lessons · ~41 min
  1. 9
    Templates Basics

    Create Django HTML templates, pass data from views, display variables, and loop over lists.

  2. 10
    Template Tags & Filters

    Use common Django template tags and filters to display lists, conditions, URLs, dates, defaults, and formatted values.

  3. 11
    Template Inheritance

    Create a base template and extend it so pages can share layout, navigation, styles, and reusable blocks.

  4. 12
    Static Files (CSS/JS/Images)

    Add CSS, JavaScript, and images to Django pages using static files, app static folders, and the static template tag.

Beginner

Models & Database

5 lessons · ~58 min
  1. 13
    Models & the ORM Intro

    Define Django models and understand how the ORM maps Python classes to database tables.

  2. 14
    Migrations

    Use makemigrations and migrate to turn Django model changes into database table changes safely.

  3. 15
    Django Admin

    Use Django admin to manage database records and customize how models appear in the built-in admin site.

  4. 16
    QuerySet Basics (CRUD)

    Use Django QuerySets to create, read, update, and delete database records with Python.

  5. 17
    Model Relationships (FK, M2M, O2O)

    Connect Django models with ForeignKey, ManyToManyField, and OneToOneField relationships.

Beginner

Forms

3 lessons · ~35 min
  1. 18
    Forms Basics

    Build Django forms, display them in templates, handle GET and POST requests, and read cleaned data.

  2. 19
    ModelForms

    Use ModelForm to create and edit model objects with less repeated form code.

  3. 20
    Form Validation

    Validate Django form fields with built-in validators, custom clean methods, and user-friendly error messages.

Beginner

Request & Response

3 lessons · ~28 min
  1. 21
    Messages Framework

    Show one-time success, error, warning, and info messages after form submissions and redirects.

  2. 22
    Redirects & HttpResponse

    Return simple responses, redirect users after actions, and choose the right response type for beginner Django views.

  3. 23
    Custom 404/500 & Raising 404

    Raise 404 errors, use get_object_or_404, and create custom 404 and 500 error templates.

Beginner

Building Pages

2 lessons · ~26 min
  1. 24
    Detail Pages & Slugs

    Create readable detail page URLs with slug fields, unique slugs, URL patterns, and get_object_or_404.

  2. 25
    List + Detail Pattern

    Build the common Django list and detail page pattern for blogs, courses, inventory apps, and other real projects.

Intermediate

Views Deep Dive

3 lessons · ~37 min
  1. 26
    Class-Based Views Intro

    Understand Django class-based views and rewrite common function views as reusable view classes.

  2. 27
    Generic List/Detail/Create/Update/Delete Views

    Use Django generic views to build common model pages with less repetitive code.

  3. 28
    Mixins & Reusable View Logic

    Share authentication, filtering, ownership, and context behavior across Django class-based views.

Intermediate

Auth & Permissions

5 lessons · ~67 min
  1. 29
    Users & Authentication

    Use Django's built-in user system to check logged-in users and protect practical views.

  2. 30
    Login, Logout & Signup Flows

    Build practical login, logout, and signup pages using Django auth views and forms.

  3. 31
    Permissions & User Passes Test

    Protect views with permissions, groups, user_passes_test, and class-based auth mixins.

  4. 32
    Password Reset Flow

    Wire Django's built-in password reset views with email settings and templates.

  5. 33
    Sessions & Cookies

    Store per-browser state safely with Django sessions and understand how cookies fit in.

Intermediate

ORM Power

4 lessons · ~54 min
  1. 34
    Advanced QuerySets & Lookups

    Filter, combine, slice, and inspect QuerySets using Django ORM lookups and Q objects.

  2. 35
    annotate, aggregate & F()

    Calculate totals, counts, and database-side expressions with Django ORM aggregation tools.

  3. 36
    select_related & prefetch_related

    Avoid N+1 queries by loading related data efficiently with select_related and prefetch_related.

  4. 37
    Custom Managers & QuerySets

    Move reusable ORM filters and domain-specific query methods into managers and QuerySets.

Intermediate

Files & Media

1 lessons · ~14 min
  1. 38
    Media Uploads & FileFields

    Accept user-uploaded files with FileField, ImageField, forms, templates, and development media URLs.

Intermediate

App Internals

3 lessons · ~34 min
  1. 39
    Signals (Practical Use)

    Use Django signals carefully for side effects such as creating profiles and reacting to saves.

  2. 40
    Middleware Basics

    Understand Django middleware and write small request/response hooks for cross-cutting behavior.

  3. 41
    Context Processors

    Add shared template variables with context processors while keeping global context lean.

Intermediate

UX Patterns

3 lessons · ~35 min
  1. 42
    Pagination

    Split long QuerySets into pages with Django Paginator and generic view pagination.

  2. 43
    Search & Filtering

    Build beginner-friendly search and filter pages with GET parameters and QuerySets.

  3. 44
    Flash Messages & UX Feedback

    Show one-time success, error, warning, and info messages after redirects.

Intermediate

Talking Outward

1 lessons · ~13 min
  1. 45
    Sending Email

    Send transactional email from Django with console, SMTP, and template-based messages.

Intermediate

APIs

3 lessons · ~45 min
  1. 46
    Django REST Framework Intro

    Create your first JSON API with Django REST Framework and understand API basics.

  2. 47
    Serializers & ViewSets

    Use DRF serializers and viewsets to turn Django models into practical CRUD API endpoints.

  3. 48
    API Authentication Basics

    Protect DRF endpoints with session authentication, token authentication concepts, and permissions.

Advanced

Quality & Safety

3 lessons · ~51 min
  1. 49
    Testing Views, Models & Forms

    Use Django tests to protect models, forms, views, permissions, redirects, and templates before bugs reach users.

  2. 50
    Django Security Essentials

    Configure production security settings, protect secrets, avoid unsafe query patterns, and use Django security checks.

  3. 51
    CSRF, XSS & Clickjacking in Practice

    Understand the browser attacks Django helps prevent and how to keep those protections working in real apps.

Advanced

Shipping

3 lessons · ~54 min
  1. 52
    Deploying Django (Gunicorn, WhiteNoise, Env Vars)

    Prepare Django for production with Gunicorn, WhiteNoise, environment variables, static collection, and deployment checks.

  2. 53
    PostgreSQL in Production

    Configure Django for PostgreSQL, use migrations carefully, understand indexes, and operate production databases safely.

  3. 54
    Static/Media in Production

    Understand the difference between static and media files, collect assets, serve uploads, and avoid common production file mistakes.

Advanced

Performance

3 lessons · ~52 min
  1. 55
    Caching Strategies

    Use Django caching at the right layer: per-view, fragment, low-level, database query, and HTTP cache headers.

  2. 56
    Async Views & When They Help

    Learn what async Django views can and cannot improve, how to call async services, and how to avoid blocking the event loop.

  3. 57
    Background Tasks (Celery-style Intro)

    Move slow work out of requests with a Celery-style task queue mental model, task definitions, retries, and status tracking.

Advanced

Pro Architecture

2 lessons · ~33 min
  1. 58
    Structuring Larger Django Projects

    Organize large Django apps with clear boundaries, service modules, query modules, templates, and URL structure.

  2. 59
    Split Settings & Environments

    Split Django settings into base, development, test, and production modules without losing clarity.

Advanced

Capstone Projects

3 lessons · ~60 min
  1. 60
    Mini Project: Blog Platform

    Build a production-shaped blog with posts, slugs, comments, moderation, tests, templates, and clean URL structure.

  2. 61
    Mini Project: Mini Store / Catalog

    Build a simple product catalog with categories, product detail pages, admin editing, query optimization, and a contact form.

  3. 62
    Mini Project: SaaS Dashboard Shell

    Build an authenticated SaaS dashboard shell with organizations, membership, protected views, settings, and tests.

Advanced

Polish & Next Steps

3 lessons · ~46 min
  1. 63
    Common Django Mistakes (and Fixes)

    Recognize frequent Django mistakes in settings, queries, templates, forms, security, migrations, and project organization.

  2. 64
    Django Ecosystem (DRF, Admin, Packages)

    Know the major tools around Django, when to reach for them, and how to evaluate packages responsibly.

  3. 65
    What to Learn After Django

    Choose a learning path after Django: APIs, databases, deployment, security, performance, frontend integration, and professional habits.