Skip to content
Learn Netverks

Lesson

Step 4/36 11% through track

mvt-overview

MVT architecture overview

Last reviewed Jun 1, 2026 Content v20260601
Track mode
server_script
Means
Server runner
Reading
~2 min
Level
beginner

This lesson

An orientation to the Django track—how the server playground works, core vocabulary, and what you will practice next.

URL routing and view boundaries organize teams—fat views and circular imports are common learner pitfalls.

You will apply MVT architecture overview in contexts like: SaaS dashboards, CMS-style products, internal tools, and APIs paired with React or mobile clients.

Write Python 3 in the editor and click Run on server—the dev runner executes your script; Django framework lessons also use local startproject for full MVT (LEARNING_RUNNER_ENABLED=true).

After HTML fundamentals and basic programming concepts—before or alongside SQL.

Django uses Model–View–Template (MVT), a variation of MVC. The framework itself acts as the controller—routing URLs to views and coordinating templates.

The three layers

  • Model — Python classes mapping to database tables (models.py); business data and validation rules
  • View — Python functions or classes handling a request; query models, return HTTP response
  • Template — HTML with Django template language for dynamic output

Request flow (simplified)

  1. Browser requests /articles/5/
  2. urls.py maps the path to a view function
  3. View loads Article from the ORM, builds context dict
  4. Template renders HTML; Django returns the response
myproject/
  manage.py
  myproject/
    settings.py
    urls.py
  blog/
    models.py
    views.py
    urls.py
    templates/blog/detail.html

Important interview questions and answers

  1. Q: MVT vs MVC?
    A: In MVC the controller handles routing; in Django the framework is the controller—your "view" is the controller logic plus response building.
  2. Q: Where does business logic live?
    A: Models (data rules), views (request handling), sometimes services/utils—avoid fat templates.
  3. Q: What is an "app"?
    A: A reusable module (blog, accounts) with its own models, views, and templates inside a project.

Self-check

  1. Which file maps URLs to view functions?
  2. What does a template produce?

Tip: Draw MVT on paper: URL → view → model query → template → HTML. The "controller" role is Django itself plus your view function.

Interview prep

MVT vs MVC?

Django's "view" is your request handler; the framework itself routes URLs and coordinates templates—the controller role is split between Django and your view code.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs on the configured server runner (dev: npm run runner with LEARNING_RUNNER_ENABLED=true). Output appears below the editor.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • MVT vs MVC diff?
  • URLconf role?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump