Skip to main content

The web framework for perfectionists with deadlines

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel.

Installation

Get Django up and running in minutes with pip and Python 3.12+

Quick Start

Build your first Django app with models, views, and URL routing

Models & ORM

Define your data models and query your database with Django’s powerful ORM

Views & Templates

Create dynamic web pages with function-based and class-based views

Why Django?

Ridiculously Fast

Django was designed to help developers take applications from concept to completion as quickly as possible. Build production-ready apps in hours, not weeks.

Reassuringly Secure

Django takes security seriously and helps developers avoid many common security mistakes. It provides built-in protection against SQL injection, cross-site scripting, cross-site request forgery, and clickjacking.

Exceedingly Scalable

Some of the busiest sites on the web leverage Django’s ability to quickly and flexibly scale to meet the highest traffic demands. From Instagram to NASA, Django powers apps serving millions of users.

Core Features

Object-Relational Mapper

Define your data models entirely in Python with a rich, dynamic database-access API. Write SQL if needed, but the ORM handles the heavy lifting.

URL Routing

Clean, elegant URL design with a Python module that maps URL patterns to Python functions. No framework cruft required.

Template Engine

Powerful template system with inheritance, filters, and tags. Keep logic in Python and presentation in templates.

Forms

Automatic HTML form generation from models, complete with validation and error handling. Never write form boilerplate again.

Admin Interface

Production-ready admin interface that reads metadata from your models. Edit content without writing custom views.

Authentication

Complete authentication system handling user accounts, groups, permissions, and cookie-based sessions.

Migrations

Automatic schema migrations generated from model changes. Version control for your database schema.

Middleware

Hooks into Django’s request/response processing. Clean, elegant way to process requests globally.

Internationalization

Full support for translating interfaces into multiple languages with Django’s i18n framework.

Security

Built-in protection against CSRF, XSS, SQL injection, clickjacking, and host header validation.

Caching

Flexible caching framework with support for memcached, Redis, database, and filesystem backends.

Task Queue

Async task execution with Django’s task framework. Schedule and execute background jobs.

GeoDjango

Geographic framework for building location-aware applications with PostGIS, SpatiaLite, and more.

Testing

Comprehensive testing framework with test client, fixtures, and assertions for robust applications.

Get Started

Installation Guide

Install Django and get your development environment ready

Build Your First App

Follow our quickstart guide to create a working Django application
Django requires Python 3.12 or higher. Make sure you have a compatible Python version installed before proceeding.

Build docs developers (and LLMs) love