Django ใช้สถาปัตยกรรม MVT (Model-View-Template) ซึ่งเป็นรูปแบบที่ดัดแปลงจากแพตเทิร์น MVC แบบคลาสสิก มันแยก application ออกเป็นสามชั้น: Models (ข้อมูล), Views (ตรรกะ) และ Templates (การแสดงผล) การเข้าใจชั้นเหล่านี้ช่วยให้ชัดเจนว่าโค้ดแต่ละส่วนควรอยู่ที่ไหน
สามชั้น
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
