Learning Django MVC and the way I thought of it is:
Models are the database tables represented in Django as Python classes.
Views are the HTML returned from function in views.py.
Controllers are the actual functions themselves in views.py invoked from a HTTP request.
However I read on Wikipedia (at the time of writing):
… a regular-expression-based URL dispatcher ("Controller").
I would have thought the mapping of URLs to functions as routing – not the controller. But perhaps I am wrong – I guess I got my ideas because is ASP MVC the functions that handle the requests are contained in classes called Contollers…
Best Answer
Your thoughts are not wrong. In MVC web-frameworks, people often speak of a Base Controller that performs the routing of a request to the actual Controller that handles the request.
This has come about because web frameworks generally have a single point where the request is received by the application and in pure MVC terms, this is where the job of the Controller starts.
The Django framework uses a non-idiomatic way of naming the parts of the MVC triad.
The mapping between Django names and the idiomatic terminology is: