Django ( ; sometimes stylized as django) is a
free and open-source
Free and open-source software (FOSS) is software available under a Software license, license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term ...
,
Python-based
web framework
A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build a ...
that runs on a
web server
A web server is computer software and underlying Computer hardware, hardware that accepts requests via Hypertext Transfer Protocol, HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, co ...
. It follows the model–template–views (MTV)
architectural pattern
Software architecture pattern is a reusable, proven solution to a specific, recurring problem focused on architectural design challenges, which can be applied within various architectural styles.
Examples
Some examples of architectural patte ...
.
It is maintained by the
Django Software Foundation (DSF), an independent organization established in the US as a
501(c)(3)
A 501(c)(3) organization is a United States corporation, Trust (business), trust, unincorporated association or other type of organization exempt from federal income tax under section 501(c)(3) of Title 26 of the United States Code. It is one of ...
non-profit.
Django's primary goal is to ease the creation of complex,
database-driven websites. The framework emphasizes
reusability
In computer programming, reusability describes the quality of a software asset that affects its ability to be used in a software system for which it was ''not'' specifically designed. An asset that is easy to reuse and provides utility is conside ...
and "pluggability" of components, less code,
low coupling, rapid development, and the principle of
don't repeat yourself
"Don't repeat yourself" (DRY) is a principle of software development aimed at reducing repetition of information which is likely to change, replacing it with abstractions that are less likely to change, or using data normalization which avoids r ...
. Python is used throughout, even for settings, files, and
data models. Django also provides an optional administrative
create, read, update and delete
In computer programming, create, read, update, and delete (CRUD) are the four basic operations (actions) of persistent storage. CRUD is also sometimes used to describe user interface conventions that facilitate viewing, searching, and changing info ...
interface that is generated dynamically through
introspection
Introspection is the examination of one's own conscious thoughts and feelings. In psychology, the process of introspection relies on the observation of one's mental state, while in a spiritual context it may refer to the examination of one's s ...
and configured via admin models.
Some well-known sites that use Django include
Instagram
Instagram is an American photo sharing, photo and Short-form content, short-form video sharing social networking service owned by Meta Platforms. It allows users to upload media that can be edited with Social media camera filter, filters, be ...
,
Mozilla
Mozilla is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, publishes and supports Mozilla products, thereby promoting free software and open standards. The community is supported institution ...
,
Disqus,
Bitbucket
Bitbucket is a Git-based source code repository hosting service owned by Atlassian. Bitbucket offers both commercial plans and free accounts with an unlimited number of private repositories.
Services Bitbucket Cloud
Bitbucket Cloud (pre ...
,
Nextdoor, and
Clubhouse.
History
Django was created in the autumn of 2003, when the
web programmers at the ''
Lawrence Journal-World
The ''Lawrence Journal-World'' is a daily newspaper published in Lawrence, Kansas, United States, by Ogden Newspapers.
History
Though the ''Journal-World'' title came into existence in 1911, the paper dates itself to 1858, according to the ...
'' newspaper,
Adrian Holovaty
Adrian Holovaty (born 1981) is an American web developer, musician and entrepreneur from Chicago, Chicago, Illinois, living in Amsterdam, the Netherlands. He is co-creator of the Django (web framework), Django web framework and an advocate of "jou ...
and
Simon Willison, began using Python to build applications. Jacob Kaplan-Moss was hired early in Django's development shortly before Willison's
internship
An internship is a period of work experience offered by an organization for a limited period of time. Once confined to medical graduates, internship is used to practice for a wide range of placements in businesses, non-profit organizations and g ...
ended. It was released publicly under a
BSD license
BSD licenses are a family of permissive free software licenses, imposing minimal restrictions on the use and distribution of covered software. This is in contrast to copyleft licenses, which have share-alike requirements. The original BSD lic ...
in July 2005. The framework was named after guitarist
Django Reinhardt
Jean Reinhardt (23 January 1910 – 16 May 1953), known by his Romani people, Romani nickname Django ( or ), was a Belgium, Belgian-born Romani jazz guitarist and composer in France. He was one of the first major jazz talents to emerge in Europe ...
.
Holovaty is a
romani jazz guitar player inspired in part by Reinhardt's music.
In June 2008, it was announced that a newly formed
Django Software Foundation (DSF) would maintain Django in the future.
Features
Components

Despite having its own nomenclature, such as naming the
callable objects generating the
HTTP
HTTP (Hypertext Transfer Protocol) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, wher ...
responses "views",
the core Django framework can be seen as an
MVC architecture.
It consists of an
object-relational mapper (ORM) that mediates between
data models (defined as Python classes) and a
relational database
A relational database (RDB) is a database based on the relational model of data, as proposed by E. F. Codd in 1970.
A Relational Database Management System (RDBMS) is a type of database management system that stores data in a structured for ...
("Model"), a system for processing HTTP requests with a
web templating system ("View"), and a
regular-expression-based
URL
A uniform resource locator (URL), colloquially known as an address on the Web, is a reference to a resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identi ...
dispatcher ("Controller").
Also included in the core framework are:
* a lightweight and standalone
web server
A web server is computer software and underlying Computer hardware, hardware that accepts requests via Hypertext Transfer Protocol, HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, co ...
for development and testing
* a form
serialization
In computing, serialization (or serialisation, also referred to as pickling in Python (programming language), Python) is the process of translating a data structure or object (computer science), object state into a format that can be stored (e. ...
and validation system that can translate between
HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
forms and values suitable for storage in the database
* a template system that utilizes the concept of
inheritance
Inheritance is the practice of receiving private property, titles, debts, entitlements, privileges, rights, and obligations upon the death of an individual. The rules of inheritance differ among societies and have changed over time. Offi ...
borrowed from object-oriented programming
* a
caching framework that can use any of several cache methods
* support for
middleware
Middleware is a type of computer software program that provides services to software applications beyond those available from the operating system. It can be described as "software glue".
Middleware makes it easier for software developers to imple ...
classes that can intervene at various stages of request processing and carry out custom functions
* an internal dispatcher system that allows components of an application to communicate events to each other via pre-defined signals
* an
internationalization
Internationalization or Internationalisation is the process of increasing involvement of enterprises in international markets, although there is no agreed definition of internationalization. Internationalization is a crucial strategy not only for ...
system, including translations of Django's own components into a variety of languages
* a
serialization
In computing, serialization (or serialisation, also referred to as pickling in Python (programming language), Python) is the process of translating a data structure or object (computer science), object state into a format that can be stored (e. ...
system that can produce and read
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
and/or
JSON
JSON (JavaScript Object Notation, pronounced or ) is an open standard file format and electronic data interchange, data interchange format that uses Human-readable medium and data, human-readable text to store and transmit data objects consi ...
representations of Django model instances
* a system for extending the capabilities of the template engine
* an interface to Python's built-in
unit test
Unit testing, component or module testing, is a form of software testing by which isolated source code is tested to validate expected behavior.
Unit testing describes tests that are run at the unit-level to contrast testing at the integration ...
framework
Bundled applications
The main Django distribution also bundles a number of applications in its "contrib" package, including:
* an extensible authentication system
* the dynamic administrative interface
* tools for generating
RSS
RSS ( RDF Site Summary or Really Simple Syndication) is a web feed that allows users and applications to access updates to websites in a standardized, computer-readable format. Subscribing to RSS feeds can allow a user to keep track of many ...
and
Atom
Atoms are the basic particles of the chemical elements. An atom consists of a atomic nucleus, nucleus of protons and generally neutrons, surrounded by an electromagnetically bound swarm of electrons. The chemical elements are distinguished fr ...
syndication feeds
* a "Sites" framework that allows one Django installation to run multiple websites, each with their own content and applications
* tools for generating
Sitemaps
Sitemaps is a protocol in XML format meant for a webmaster to inform search engines about URLs on a website that are available for web crawling. It allows webmasters to include additional information about each URL: when it was last updated, h ...
* built-in mitigation for
cross-site request forgery,
cross-site scripting
Cross-site scripting (XSS) is a type of security vulnerability that can be found in some web applications. XSS attacks enable attackers to inject client-side scripts into web pages viewed by other users. A cross-site scripting vulnerability may be ...
,
SQL injection
In computing, SQL injection is a code injection technique used to attack data-driven applications, in which malicious SQL statements are inserted into an entry field for execution (e.g. to dump the database contents to the attacker). SQL injec ...
,
password cracking and other typical web attacks, most of them turned on by default
* a framework for creating
geographic information system
A geographic information system (GIS) consists of integrated computer hardware and Geographic information system software, software that store, manage, Spatial analysis, analyze, edit, output, and Cartographic design, visualize Geographic data ...
(GIS) applications
Extensibility
Django's configuration system allows third party code to be plugged into a regular project, provided that it follows the reusable app conventions. More than 5000 packages are available to extend the framework's original behavior, providing solutions to issues the original tool didn't tackle: registration, search,
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
provision and consumption,
CMS, etc.
This extensibility is, however, mitigated by internal components' dependencies. While the Django philosophy implies loose coupling, the template filters and tags assume one engine implementation, and both the auth and admin bundled applications require the use of the internal
ORM. None of these filters or bundled apps are mandatory to run a Django project, but reusable apps tend to depend on them, encouraging developers to keep using the official stack in order to benefit fully from the apps ecosystem.
Server arrangements
Django can be run on
ASGI or
WSGI-compliant web servers. Django officially supports five database backends:
PostgreSQL
PostgreSQL ( ) also known as Postgres, is a free and open-source software, free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. PostgreSQL features transaction processing, transactions ...
,
MySQL
MySQL () is an Open-source software, open-source relational database management system (RDBMS). Its name is a combination of "My", the name of co-founder Michael Widenius's daughter My, and "SQL", the acronym for Structured Query Language. A rel ...
,
MariaDB
MariaDB is a community-developed, commercially supported Fork (software development), fork of the MySQL relational database management system (RDBMS), intended to remain free and open-source software under the GNU General Public License. Developm ...
,
SQLite
SQLite ( "S-Q-L-ite", "sequel-ite") is a free and open-source relational database engine written in the C programming language. It is not a standalone app; rather, it is a library that software developers embed in their apps. As such, it ...
, and
Oracle
An oracle is a person or thing considered to provide insight, wise counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. If done through occultic means, it is a form of divination.
Descript ...
.
Microsoft SQL Server
Microsoft SQL Server is a proprietary relational database management system developed by Microsoft using Structured Query Language (SQL, often pronounced "sequel"). As a database server, it is a software product with the primary function of ...
can be used with mssql-django.
Version history
The Django team will occasionally designate certain releases to be "long-term support" (LTS) releases. LTS releases will get security and data loss fixes applied for a guaranteed period of time, typically 3+ years, regardless of the pace of releases afterwards.
DjangoCon
There is a semiannual conference for Django developers and users, named "DjangoCon", that has been held since September 2008. DjangoCon is held annually in Europe, in May or June; while another is held in the United States in August or September, in various cities. The 2012 DjangoCon took place in Washington, D.C., from September 3 to 8. 2013 DjangoCon was held in Chicago at the Hyatt Regency Hotel and the post-conference
Sprints were hosted at Digital Bootcamp, computer training center. The 2014 DjangoCon US returned to
Portland, OR from August 30 to 6 September. The 2015 DjangoCon US was held in
Austin
Austin refers to:
Common meanings
* Austin, Texas, United States, a city
* Austin (given name), a list of people and fictional characters
* Austin (surname), a list of people and fictional characters
* Austin Motor Company, a British car manufac ...
, TX from September 6 to 11 at the AT&T Executive Center. The 2016 DjangoCon US was held in Philadelphia, PA at The
Wharton School of the University of Pennsylvania
The Wharton School ( ) is the business school of the University of Pennsylvania, a private Ivy League research university in Philadelphia. Established in 1881 through a donation from Joseph Wharton, a co-founder of Bethlehem Steel, the Wharton ...
from July 17 to 22. The 2017 DjangoCon US was held in Spokane, WA; in 2018 DjangoCon US was held in San Diego, CA. DjangoCon US 2019 was held again in San Diego, CA from September 22 to 27. DjangoCon 2021 took place virtually and in 2022, DjangoCon US returned to San Diego from October 16 to 21. DjangoCon US 2023 was held from October 16 to 20 at the
Durham, NC convention center and DjangoCon US 2024 is scheduled to return to Durham for September 22 to 27.
Django mini-conferences are usually held every year as part of the Australian
Python Conference
The Python Conference (also called PyCon) is the largestpage 10 annual convention for the discussion and promotion of the Python programming language. It originated in the United States but is also held in more than 40 other countries. It was one ...
'PyCon AU'. Previously, these mini-conferences have been held in:
*
Hobart
Hobart ( ) is the capital and most populous city of the island state of Tasmania, Australia. Located in Tasmania's south-east on the estuary of the River Derwent, it is the southernmost capital city in Australia. Despite containing nearly hal ...
, Australia, in July 2013,
*
Brisbane
Brisbane ( ; ) is the List of Australian capital cities, capital and largest city of the States and territories of Australia, state of Queensland and the list of cities in Australia by population, third-most populous city in Australia, with a ...
, Australia, in August 2014 and 2015,
*
Melbourne
Melbourne ( , ; Boonwurrung language, Boonwurrung/ or ) is the List of Australian capital cities, capital and List of cities in Australia by population, most populous city of the States and territories of Australia, Australian state of Victori ...
, Australia in August 2016 and 2017, and
*
Sydney
Sydney is the capital city of the States and territories of Australia, state of New South Wales and the List of cities in Australia by population, most populous city in Australia. Located on Australia's east coast, the metropolis surrounds Syd ...
, Australia, in August 2018 and 2019.
Django has spawned user groups and meetups around the world, a notable group is the
Django Girls
Django Girls is an international non-profit organization started by two Polish women, Ola Sitarska and Ola Sendecka, to inspire women from all backgrounds to get interested in technology and to become programmers, offering a safe and friendly en ...
organization, which began in Poland but now has had events in 91 countries.
Ports to other languages
Programmers have ported Django's template engine design from Python to other languages, providing decent cross-platform support. Some of these options are more direct ports; others, though inspired by Django and retaining its concepts, take the liberty to deviate from Django's design:
* Liquid for
Ruby
Ruby is a pinkish-red-to-blood-red-colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sapph ...
* Template::Swig for
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Though Perl is not officially an acronym, there are various backronyms in use, including "Practical Extraction and Reporting Language".
Perl was developed ...
*
Twig
A twig is a thin, often short, branch of a tree or Bush (plant), bush.
The buds on the twig are an important diagnostic characteristic, as are the abscission scars where the leaves have fallen away. The color, texture, and patterning of the t ...
for
PHP and
JavaScript
JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior.
Web browsers have ...
*
Jinja for
Python
* ErlyDTL for
Erlang
CMSs based on Django Framework
Django as a framework is capable of building a complete
CMS. Some dedicated CMS projects are based upon Django:
*
Django CMS
*
Wagtail
* Mezzanine
See also
*
FastAPI
*
Flask
*
Jam.py
*
Pylons project
*
Web2py
*
Tornado
A tornado is a violently rotating column of air that is in contact with the surface of Earth and a cumulonimbus cloud or, in rare cases, the base of a cumulus cloud. It is often referred to as a twister, whirlwind or cyclone, although the ...
*
Ruby on Rails
Ruby on Rails (simplified as Rails) is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web pa ...
*
Comparison of web frameworks
Django REST framework
References
Bibliography
*
*
*
*
*
*
*
External links
*
{{DEFAULTSORT:Django
Free software programmed in Python
Python (programming language) web frameworks
Software using the BSD license
Web frameworks