How the Web Works
Before you write a line of Django, it helps to know the one conversation it takes part in, millions of times a day. A reader clicks a link to your cookbook site. Something travels out, something comes back, and a recipe appears. Django lives in the middle of that exchange, so this is the map for everything that follows.
The rule
The browser asks, the server answers: one request, one response.
Every page load is a short, polite exchange written in HTTP. The browser (the client) sends a request; the machine hosting the site (the server) sends back a response.
A request names a method (what you want to do) and a path (what you want it done to):
GET /recipes/tomato-soup/ HTTP/1.1
Host: cookbook.example.com
Accept: text/htmlThe response starts with a status code, then headers, then the body, usually HTML:
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
<h1>Tomato soup</h1>The methods you will meet first are GET (fetch something, change nothing) and POST (send data, such as a new recipe from a form). Status codes come in families: 2xx worked (200 OK), 3xx go elsewhere (302 redirect), 4xx the client asked for something wrong (404 Not Found), 5xx the server broke (500).
HTTP is stateless: the server does not remember you between requests by itself. Sites that "know" you are logged in do it with a cookie the browser sends back with every request.