Django 5.0 is now available

The web framework for
perfectionists with deadlines.

Ridiculously fast. Reassuringly secure. Exceedingly scalable. Build better web apps more quickly and with less code.

views.py
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. You're at the polls index.")

Trusted by the giants

Instagram Logo
campaignDisqus
music_noteSpotify
push_pinPinterest
movieIMDb
travel_exploreNatGeo

Batteries Included.

Django ships with a powerful standard library that abstracts away the boring parts of web development.

admin_panel_settings

Authentication

Secure user accounts, groups, permissions, and cookie-based user sessions out of the box.

dashboard

Admin Interface

A production-ready administrative interface generated automatically from your models.

construction
database

Powerful ORM

Define your data models in Python. You get a rich, dynamic database-access API for free.

history

Migrations

Propagate changes you make to your models into your database schema automatically.

Core Philosophy

Input
Process
Single Source of Truth

Process_Optimization_V2.0

Don't Repeat Yourself

content_copy

Every distinct concept and piece of data should live in exactly one place. Redundancy is bad. Normalization is good.

Hover to inspectarrow_downward
explicit_config = True

No_Magic_Found

Explicit is Better

visibility

Magic shouldn't happen too much. Django believes that explicit code is easier to understand and debug.

Reveal internalsarrow_downward
databaseModel
settingsView
htmlTemplate

MTV Architecture

Django follows the Model-Template-View pattern. It cleanly separates data access logic, business logic, and presentation logic.

  • Model: Data access layer
  • Template: Presentation layer
  • View: Business logic layer
# models.py
class Article(models.Model): ...
# views.py
def article_detail(request, id): ...
# template.html
<h1>{{ article.title }}</h1>
Tap to view cycle