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 Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

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!

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay