From zero to your first Python web project
No programming background needed. One path through Python, PostgreSQL, and Django — each stop assumes only the ones before it — ending with a framework you already built by hand, and the know-how to put your project on the real internet.
-
stage 01
Set up your toolbox
Three installs and five terminal commands. Do this once, properly, and no later lab ever gets to blame your machine.
✓ You can open a terminal, cd into a folder, run a Python file, and read the traceback when it fails.
-
stage 02
Learn just enough Python
Not all of Python — the working core: values, names, decisions, loops, the two containers, and functions.
✓ You're comfortable with functions, lists, and dicts — the exact bar every later stop assumes.
-
stage 03
Keep every version of your work
You now have files worth keeping. Stop making copies called shop_final_v2.py — learn the tool that keeps every version of everything, forever.
✓ You can init a repository, commit, read the log, and get yesterday's version back.
-
stage 04
Speak the browser's language
Everything you'll build from here on ends as an HTML document. Learn to read and hand-write one before you start generating them with Python.
✓ You can hand-write a small page, style it, and predict how the browser will draw it.
-
stage 05
See the machine you're building for
Before writing any server code, watch the machinery you're writing for. Four theory guides, each with simulators to step through.
- How HTTP works // theory The ask/answer conversation every page load is made of: messages, status codes, cookies.
- How HTTP servers work // theory The accept → parse → route → respond loop — the one you'll soon write yourself.
- How browsers work // theory URL to pixels: DNS, TCP, TLS, parsing, layout, paint.
- How rendering works: server-side vs client-side // theory Someone has to turn data into HTML. Deciding who settles what kind of project you build.
✓ You can narrate what happens between typing a URL and pixels appearing — and point at the exact step where your Python code will run.
-
stage 06
Level up your Python
Every framework API you'll touch — views, models, forms — is a class. Get comfortable with objects before the labs start leaning on them.
- Object-oriented Python // lab Classes, self, inheritance, dunder methods — built through a small food-delivery order system.
- From source code to running program // side quest What actually happens when you run a Python file — compilers, the Python VM, memory. Worth it, not blocking.
✓ You can read a class definition and know exactly what Python does with it — no magic left in self or __init__.
-
stage 07
Build your first server — no framework
Just the standard library, so there's nowhere for magic to hide.
✓ You've served HTML built from data in ~45 lines of Python and proven it's server-side rendering with view-source.
-
stage 08
Put the data where it belongs
Real applications don't freeze data into source code. Install PostgreSQL, learn its rules, then render whatever is in the table right now.
- PostgreSQL 101: a quick introduction // theory + install Servers, databases, tables, constraints — and the one installer that puts the engine and pgAdmin on your machine.
- Server-side rendering in pure Python, part 2 // lab · ~45 min Same server, live rows from PostgreSQL — plus two SQL-injection lessons you'll never forget.
✓ You edit a row in pgAdmin, refresh the browser, and the page changes — without restarting anything.
-
stage 09
Build Django's core by hand
Django's heart is three ideas: a callable that speaks WSGI, a route table, and a translator between objects and rows. Build each one small.
- How regular expressions work // side quest The router in the next lab uses four regex symbols. The lab explains them — read this if you want the full story.
- How WSGI works // lab · ~40 min The server-to-framework contract — implement it, then grow it into a micro framework with routing and middleware.
- How ORMs work // lab · ~45 min Build a tiny ORM in ~50 lines: a Model class that turns objects into INSERTs and SELECTs back into objects.
✓ You've written ~90 lines that are, structurally, a web framework — routing, middleware, and an ORM.
-
stage 10
Let users in — safely
A web project without users is a brochure. Learn the two questions every app asks, and the attack the browser's cookie rules make possible.
- How auth works: authentication vs authorization // theory Who are you, and what may you do? Logins, 401s, session cookies, 403s, roles.
- How HTML forms work // theory GET vs POST, the duplicate-order bug, and how CSRF attacks work — with and without the token.
✓ You know what a session cookie proves, what a 403 means, and why every Django form ships a hidden token.
-
stage 11
Set up projects like a professional
Every lab so far ran on the standard library, deliberately. One step before Django: how other people's code gets onto your machine without projects breaking each other.
✓ You can start any new project with a clean virtual environment and a lock file.
-
stage 12
Meet the framework you already built
You've now hand-built every piece Django industrializes. The capstone assembles the map: your ~150 lines against Django's modules, side by side.
✓ Django never gets to feel like magic. You're ready for the official tutorial — and then a project of your own.
-
stage 13
Put it on the internet
localhost:8000 is unreachable from the internet by design. Learn the boxes every hosting provider assembles — proxy, workers, static files, secrets — so any deploy dashboard reads as things you already understand.
✓ You can name every box between a visitor's browser and your code — and you know a PaaS is just those boxes, rented pre-assembled.
Do the official Django tutorial — the capstone has already told you what every file in it is. Then rebuild the student portal from the SSR labs in Django: models for the students table, a view per page, forms with CSRF for adding rows, the whole thing in a Git repository. Deploy it on a PaaS using what stage 13 taught you. That's your first web project on the real internet — and you'll understand every layer of it.