Django segue l'architettura MVT (Model-View-Template) — la sua variazione sul classico pattern MVC. Separa un'applicazione in tre livelli: Models (dati), Views (logica) e Templates (presentazione). Comprendere i livelli chiarisce dove appartiene ogni pezzo di codice.
I tre livelli
Model → the DATA layer: defines structure & talks to the database (the ORM)
View → the LOGIC layer: processes requests, fetches data, returns responses
Template → the PRESENTATION layer: HTML with placeholders for dynamic data
