Django’s Model Template View
Django follows the MVC pattern but uses a slightly different nomenclature. Understanding how Django Models, Templates and Views are used to create apps and projects is essential to being able to run Django applications in production or to create your own. You should take the time to understand the architecture and patterns and how to use them effectively.
Goals/Objectives/Outcomes
- Understand the key principles of te MVC software architecture pattern
- Understand how Django’s MTV is related to MVC and how this pattern is widely used in modern internet applications on the web and mobile.
- Understand the difference between controllers and views and templates
- Understand the concepts behind separating business logic from presentation logic in an application
- Understand how Django Class-based views work and are used
Reference Material
- https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
- https://docs.djangoproject.com/en/1.8/faq/general/#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names
- http://www.tangowithdjango.com/book/chapters/models_templates.html
- https://docs.djangoproject.com/en/1.8/topics/class-based-views/
- http://www.pythoncentral.io/writing-models-for-your-first-python-django-application/
Measures of Success
- Participant can articulate the key principles of the MVC software architecture pattern
- Participant can articulate how Django’s MTV pattern follows MVC but how the nomenclature differs
- Participant can articulate why this pattern is so widely used on the web
- Participant has demonstrated the ability to create class based views in their own projects