:: cyberia ::
A castle considered separately might be our MVC ecosystem, with the moat and the gate reminding us to think about security issues (yes, it's a memory palace). The keep is the model (M) whereas the templating (V) is done in the shops (guilds, smithies) around the inside of the protective wall (the firewall).
:: workshop model ::
In the Django framework, an incoming httpRequest is matched at the gate by a regular expression (or falls through the cracks), is escorted (passed) to a view function, perhaps to fetch from the keep (Postgres?).
The results get "dipped and rolled" in a typesetting template and sent back out the gate in an httpResponse suitcase (properly padlocked in some instances).
The HttpRequest object is actually passed into your view function by Django. You use this view to gather and process information about the request in the view function. When you are finished handling the request, the view function is required to return an HttpResponse object.Calling Python "the controller" in this particular castle is somewhat of a misnomer as really the developers and administrators control the site. Python is merely an implementation language, like PHP or Java.
Sams Teach Yourself Django in 24 Hours by Brad Dayley
However, since we're looking at source code, which is "what runs", there's a sense that we're punching the right ticket here.