✦ Web Development with Django Start web development

L3 · Concept 01 · Web Fundamentals

What Happens When
You Press Enter?

A web page is the result of a conversation between your browser and a server. Learn the route before you start building with Django.

Learning goalExplain how a browser finds a server, sends an HTTP request, receives a response, and renders a page — including where Django can work on the server side.
01 Learn02 Explore in your browser03 Check your understanding

Learning as a guest

Learning as a guest? Save your progress!

Create a free account to learn with Sloby AI, check your understanding, and track your progress.

The entire platform is free throughout 2026. Foundations stays free forever.

See the two separate jobs

From a URL to a rendered page

First the browser finds the server. Only then does HTTP carry a request to that server and bring a response back.

BrowserYou enter a URL.
Look up the domain
DNSFinds the matching IP address.
Returns an IP address

HTTP communication with the server

BrowserSends a request for a resource.
HTTP request
Server / DjangoProcesses the request and prepares content.
HTTP response
BrowserReads HTML and loads linked resources.

This is a teaching diagram, not a literal network map. Real page loads can also include TLS setup, caches, and many additional requests.

A URL starts a conversation

Imagine typing a website address into a browser and pressing Enter. The browser does not already know where that site lives. It first needs an address for the server, then it can send a request and process the response.

GET /learn HTTP/1.1
Host: example.com

HTTP/1.1 200 OK
Content-Type: text/html

<html>…</html>

The browser is the client: it asks for a page. A web server receives that request and sends a response. Many different clients can ask the same server for pages at the same time.

A domain such as example.com is a memorable name. DNS helps find the matching IP address, which identifies the server on a network. This is simplified: DNS answers may be cached, and DNS does not carry every later HTTP request.

↳

HTTP in one sentence: HTTP is the web protocol used for requests and responses. A browser commonly sends GET when asking for a page. A 200 status means success; 404 means the requested resource was not found. Headers provide extra information, such as the response content type.

After the first HTML response
<link rel="stylesheet" href="site.css">
<script src="app.js"></script>
<img src="logo.png" alt="Logo">

The browser parses the HTML, then requests referenced CSS, JavaScript, images, and other resources. One visible page often requires many network requests.

Where Django fits
browser → web server → Django URL routing → view → HTTP response

Django runs on the server side. It can route a request to a view, use a database when needed, and return an HTTP response — often HTML. Django is one useful backend framework, not a requirement for every website.

Where Django fits in the server-side work

Django works behind the web server after an HTTP request reaches your application.

  1. HTTP requestThe server passes a request into Django.
  2. URL routingDjango chooses which view should handle its URL.
  3. ViewThe view decides what work and response are needed.
  4. Template / dataA view may render HTML with a template or use models and a database when needed.
  5. HTTP responseDjango returns a response for the server to send back to the browser.

A Django response does not always need a template or a database. These are tools a view can use when the request needs them.

↳

Why this matters for Django: Soon you will run a Django server locally, define URL routes, and write a view that returns a response. Knowing the request route makes those steps easier to connect.

The route from URL to page

  1. Find the serverDNS translates the domain into an IP address so the browser knows where to connect.
  2. Send a requestThe browser sends an HTTP request, often GET, asking the server for a resource.
  3. Build a responseThe server — and sometimes Django — prepares a status, headers, and content such as HTML.
  4. Render and fetch more resourcesThe browser reads HTML, requests linked files, and displays the finished result.

Useful distinctions

  • DNS is not the web pageDNS helps find an address. HTTP carries the request and response after the browser knows where to connect.
  • A response is more than HTMLA response also has a status code and headers. HTML can then trigger more requests for CSS, JavaScript, and images.

Guided Lab — Explore a Real Web Request

Do this in your browser

Use browser Developer Tools to inspect one real page request. You do not need Python, VS Code, or an external service for this lab.

What you are inspecting
Browser
└── Developer Tools
    └── Network
        └── main document request

The Network panel shows the requests made while a page loads. Interface labels differ slightly between browsers: Chrome and Edge use Network; Firefox uses Network; Safari may require enabling developer features first.

Inspect one page load

  1. Open Developer ToolsOpen any page you are allowed to inspect. Use the browser menu or its Developer Tools shortcut, then choose the Network tab.
  2. Reload the pageRefresh while the Network panel is open so it records a new page load.
  3. Find the main documentLook for the row whose type is document or Doc. It is usually the main HTML response, not an image or stylesheet.
  4. Read the request factsOpen that row and find Request URL, Request Method, Status Code, Response Headers, and Content-Type.
  5. Explain the resultIn your own words, connect the URL, the server response, and the files the browser requested afterward.
↳

Expected result: Request URL: https://… Request Method: GET Status Code: 200 (or another meaningful status) Content-Type: text/html; … You should be able to identify these fields, not force a particular status. A page can legitimately return a status other than 200.

If the Network panel is confusing

  • The list is emptyOpen Network first, then reload the page. Clear any old rows if necessary.
  • You cannot see the HTML documentFilter by document or Doc, and look for the page URL rather than a CSS, JavaScript, or image file.
  • The browser used a cached responseReload again. Developer Tools can also offer a disable-cache option while it is open.
  • You cannot find Developer ToolsCheck your browser help. In Safari, first enable developer features in its settings.
↳

Browser DevTools lets you observe real requests. Later lessons will explain HTTP, URLs, HTML, CSS, and Django in much more detail.

What happens after the browser receives this HTML?

Predict the next network activity before checking your answer.

<link rel="stylesheet" href="site.css">
Choose the output

Build confidence independently

Explain one web request

Choose a page you can inspect and describe the route from browser to server and back without copying a definition.

Your goalName the client, domain and DNS, server, HTTP request, HTTP response, and browser rendering. Include one sentence about where Django could run.
browser → DNS lookup → server → HTTP response → rendered page

Use your browser and your own notes

Progressive hints
  • Start with the browser: it is the client that asks for a resource.
  • Use DNS only for finding the server address, then describe the HTTP request and response.
  • After the browser receives HTML, remember linked CSS, JavaScript, and image resources.

Ask Sloby for one guiding question about DNS, HTTP, or Django’s server-side role. Do not ask it to complete your explanation for you.

Sloby, the Python AI Tutor mascot

Your learning mentor

Sign in to ask Sloby

Create a free account or sign in to get AI guidance while you learn.

Sign in to check your understanding

Create a free account or sign in to receive AI feedback and save your learning progress.

Python AI Tutor · Learn by understanding, not just by running code.