What's the difference between the MVC architecture and Django's MTV?

3

I would like to know if there is any difference in practice between these two architectures.

    
asked by anonymous 17.10.2017 / 18:59

2 answers

3

Basically 'and nomenclature issue, the django view' is exactly the equivalent of the controler in MVC. The template (M T V) and the html file rendered by the view (controller) would be the equivalent of the view in MVC

Model (models.py) Template (rendered HTML file) View (controller-equivalent views.py in MVC)

    
19.10.2017 / 15:55
1

This is just a more conceptual question. The Django developers understand that the controller is the framework itself. If we stop to think this makes sense, since when you access some url of your application, the Django engine itself redirects to the correct view, as you defined it in the url settings, ie it is understood here that the role controller is already running automatically. So the method or class that will render what will happen when this particular page is accessed was called view. Finally, the way your page will be displayed (using the view variable dictionary) is a template.

I really hope I have helped!

    
19.10.2017 / 04:21