liveBook · Manning

WSGI

As explained in Django in Action

WSGI is the Python Web Server Gateway Interface standard for connecting web servers with Python web applications.

WSGI is the handoff between a web server and a Python web application such as Django. It keeps the jobs distinct: the web server receives the browser request, WSGI calls Django, and Django generates the response. section 1.1

Figure 1.1 Django handling a page visit
figure

Follow the request from browser to web server, through WSGI and Django, to the view that formulates the response. section 1.1

A typical page visit proceeds like this:

  • The browser requests a URL from the web server. section 1.1
  • The web server passes the relevant request to Django through WSGI. section 1.1
  • Django matches the URL to a view, and the view produces the page response. section 1.1

How Django in Action covers it

How deep it goes
Explains the request handoff and surrounding URL-to-view flow, but does not detail the WSGI protocol implementation.
Examples
Uses a browser page visit that travels through a web server, WSGI, Django URL mapping, and a view.
What you can do after
Understand how a Django application receives requests and returns responses without treating Django as the web server.
How it connects
Links web servers, Django, URLs, views, and HTTP responses.

Also explained in

Compare how 2 books explain WSGI →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Django in Action. The section links point to the parts of the book it draws on.