DEV Community

Samuel Lubliner
Samuel Lubliner

Posted on

Django (Python) Introduction

From: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Introduction

About Django

  • Python
  • High-level web framework
  • Rapid development
  • Secure
  • Maintainable
  • Scalable
  • Free and open source
  • Batteries included
  • Somewhat opinionated

Model View Template

Django uses the Model View Template (MVT) architecture, similar to the Model View Controller architecture.

URL mapper

  • User requests go to urls.py, which maps the request to a view.

View

  • The request handler function in views.py processes the request and may interact with models.
  • Django views are similar to controllers and actions in Rails.

Models

  • Python objects that model data
  • Provides an API to interact with the database

Templates

  • Define the structure of any type of file
  • Placeholders populated with data from a model
  • Renders HTML and other file types
  • The rendered template is sent back as the response to the user.

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (2)

Collapse
 
geancarlos profile image
Gean Carlos

Great introduction Samuel.

Collapse
 
duncan_true profile image
Dun

Great introduction to Django! The MVT architecture and built-in features really make web development faster and more secure. Thanks for the detailed breakdown!

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more