HOME

TheInfoList



OR:

Django ( ; sometimes stylized as django) is a
free and open-source Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software where anyone is freely licensed to use, copy, study, and change the software in any way, and the source ...
, 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 an ...
that follows the model–template–views (MTV)
architectural pattern An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context. The architectural patterns address various issues in software engineering, such as computer hardware perfor ...
. It is maintained by the Django Software Foundation (DSF), an independent organization established in the US as a 501(c)(3) non-profit. Django's primary goal is to ease the creation of complex, database-driven websites. The framework emphasizes
reusability In computer science and software engineering, reusability is the use of existing ''assets'' in some form within the software product development process; these ''assets'' are products and by-products of the software development life cycle and ...
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 software patterns, replacing it with abstractions or using data normalization to avoid redundancy. The DRY principle is stated as "Every piece o ...
. 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 of persistent storage. CRUD is also sometimes used to describe user interface conventions that facilitate viewing, searching, and changing information ...
interface that is generated dynamically through
introspection Introspection is the examination of one's own Consciousness, conscious thoughts and feelings. In psychology, the process of introspection relies on the observation of one's Mental representation, mental state, while in a Spirituality, spiritual c ...
and configured via admin models. Some well-known sites that use Django include
Instagram Instagram is a photo and video sharing social networking service owned by American company Meta Platforms. The app allows users to upload media that can be edited with filters and organized by hashtags and geographical tagging. Posts can ...
,
Mozilla Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, spreads and supports Mozilla products, thereby promoting exclusively free software and open standards, w ...
,
Disqus Disqus () is an American blog comment hosting service for web sites and online communities that use a networked platform. The company's platform includes various features, such as social integration, social networking, user profiles, spam and ...
,
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 (previo ...
, Nextdoor and Clubhouse.


History

Django was created in the fall of 2003, when the
web programmer Web development is the work involved in developing a website for the Internet (World Wide Web) or an intranet (a private network). Web development can range from developing a simple single static page of plain text to complex web applications ...
s 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 is a form of the Latin given name Adrianus or Hadrianus. Its ultimate origin is most likely via the former river Adria from the Venetic and Illyrian word ''adur'', meaning "sea" or "water". The Adria was until the 8th century BC the main ...
and Simon Willison, began using Python to build applications.
Jacob Kaplan-Moss Jacob (; ; ar, يَعْقُوب, Yaʿqūb; gr, Ἰακώβ, Iakṓb), later given the name Israel, is regarded as a patriarch of the Israelites and is an important figure in Abrahamic religions, such as Judaism, Christianity, and Islam. Jac ...
was hired early in Django's development shortly before Simon Willison's internship 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 li ...
in July 2005. The framework was named after guitarist
Django Reinhardt Jean Reinhardt (23 January 1910 – 16 May 1953), known by his Romani nickname Django ( or ), was a Romani-French jazz guitarist and composer. He was one of the first major jazz talents to emerge in Europe and has been hailed as one of its most ...
. Adrian Holovaty is a Romani jazz guitar player and a big fan of Django Reinhardt. 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 The Hypertext Transfer Protocol (HTTP) 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, ...
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 A data model is an abstract model that organizes elements of data and standardizes how they relate to one another and to the properties of real-world entities. For instance, a data model may specify that the data element representing a car be c ...
(defined as Python classes) and a
relational database A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relatio ...
("Model"), a system for processing HTTP requests with a web templating system ("View"), and a regular-expression-based URL dispatcher ("Controller"). Also included in the core framework are: * a lightweight and standalone
web server A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initi ...
for development and testing * a form serialization and validation system that can translate between
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
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. Offici ...
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 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 implement c ...
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 In economics, 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 strateg ...
system, including translations of Django's own components into a variety of languages * a
serialization In computing, serialization (or serialisation) is the process of translating a data structure or object state into a format that can be stored (e.g. files in secondary storage devices, data buffers in primary storage devices) or transmitted (e ...
system that can produce and read
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. ...
and/or
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other s ...
representations of Django model instances * a system for extending the capabilities of the template engine * an interface to Python's built-in
unit test In computer programming, unit testing is a software testing method by which individual units of source code—sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures&m ...
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 di ...
and
Atom Every atom is composed of a nucleus and one or more electrons bound to the nucleus. The nucleus is made of one or more protons and a number of neutrons. Only the most common variety of hydrogen has no neutrons. Every solid, liquid, gas ...
syndication feeds * a "Sites" framework that allows one Django installation to run multiple websites, each with their own content and applications * tools for generating Google Sitemaps * built-in mitigation for
cross-site request forgery Cross-site request forgery, also known as one-click attack or session riding and abbreviated as CSRF (sometimes pronounced ''sea-surf'') or XSRF, is a type of malicious exploit of a website or web application where unauthorized commands are submitt ...
,
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 ...
,
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 inj ...
,
password cracking In cryptanalysis and computer security, password cracking is the process of recovering passwords from data that has been stored in or transmitted by a computer system in scrambled form. A common approach ( brute-force attack) is to repeatedly t ...
and other typical web attacks, most of them turned on by default * a framework for creating 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 2500 packages are available to extend the framework's original behavior, providing solutions to issues the original tool didn't tackle: registration, search, API 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 in conjunction with Apache,
Nginx Nginx (pronounced "engine x" ) is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Igor Sysoev and publicly released in 2004. Nginx is free and open-source software ...
using WSGI, Gunicorn, or
Cherokee The Cherokee (; chr, ᎠᏂᏴᏫᏯᎢ, translit=Aniyvwiyaʔi or Anigiduwagi, or chr, ᏣᎳᎩ, links=no, translit=Tsalagi) are one of the indigenous peoples of the Southeastern Woodlands of the United States. Prior to the 18th century, th ...
using flup (a Python module). Django also includes the ability to launch a
FastCGI FastCGI is a binary protocol for interfacing interactive programs with a web server. It is a variation on the earlier Common Gateway Interface (CGI). FastCGI's main aim is to reduce the overhead related to interfacing between web server and CGI p ...
server, enabling use behind any web server which supports FastCGI, such as
Lighttpd lighttpd (pronounced "lighty") is an open-source web server optimized for speed-critical environments while remaining standards-compliant, secure and flexible. It was originally written by Jan Kneschke as a proof-of-concept of the c10k problem � ...
or
Hiawatha Hiawatha ( , also : ), also known as Ayenwathaaa or Aiionwatha, was a precolonial Native American leader and co-founder of the Iroquois Confederacy. He was a leader of the Onondaga people, the Mohawk people, or both. According to some accou ...
. It is also possible to use other WSGI-compliant web servers. Django officially supports five database backends:
PostgreSQL PostgreSQL (, ), also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. It was originally named POSTGRES, referring to its origins as a successor to the In ...
,
MySQL MySQL () is an 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 relational database ...
,
MariaDB MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system (RDBMS), intended to remain free and open-source software under the GNU General Public License. Development is led by some of the ...
,
SQLite SQLite (, ) is a 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 belongs to the family of embedded databases. It is the mo ...
, and
Oracle An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination. Description The wor ...
.
Microsoft SQL Server Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which ...
can be used with django-mssql while similarly external backends exist for
IBM Db2 Db2 is a family of data management products, including database servers, developed by IBM. It initially supported the relational model, but was extended to support object–relational features and non-relational structures like JSON and ...
, SQL Anywhere and Firebird. There is a
fork In cutlery or kitchenware, a fork (from la, furca ' pitchfork') is a utensil, now usually made of metal, whose long handle terminates in a head that branches into several narrow and often slightly curved tines with which one can spear foods ...
named django-nonrel, which supports
NoSQL A NoSQL (originally referring to "non- SQL" or "non-relational") database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. Such databases have existed ...
databases, such as
MongoDB MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Ser ...
and
Google App Engine Google App Engine (often referred to as GAE or simply App Engine) is a cloud computing platform as a service for developing and hosting web applications in Google-managed data centers. Applications are sandboxed and run across multiple servers ...
's Datastore. Django may also be run in conjunction with
Jython Jython is an implementation of the Python programming language designed to run on the Java platform. The implementation was formerly known as JPython until 1999. Overview Jython programs can import and use any Java class. Except for some stand ...
on any
Java EE Jakarta EE, formerly Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web se ...
application server such as
GlassFish GlassFish is an open-source Jakarta EE platform application server project started by Sun Microsystems, then sponsored by Oracle Corporation, and now living at the Eclipse Foundation and supported by Payara, Oracle and Red Hat. The supported ...
or
JBoss WildFly, formerly known as JBoss AS, or simply JBoss, is an application server written by JBoss, now developed by Red Hat. WildFly is written in Java and implements the Java Platform, Enterprise Edition (Java EE) specification. It runs on mu ...
. In this case django-jython must be installed in order to provide
JDBC Java Database Connectivity (JDBC) is an application programming interface (API) for the programming language Java, which defines how a client may access a database. It is a Java-based data access technology used for Java database connectivity. ...
drivers for database connectivity, which also can provide functionality to compile Django in to a .war suitable for deployment.


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 3 to 8 September. 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 Portland most commonly refers to: * Portland, Oregon, the largest city in the state of Oregon, in the Pacific Northwest region of the United States * Portland, Maine, the largest city in the state of Maine, in the New England region of the northeas ...
, OR from 30 August to 6 September. The 2015 DjangoCon US was held in Austin, TX from 6 to 11 September 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 of the University of Pennsylvania ( ; also known as Wharton Business School, the Wharton School, Penn Wharton, and Wharton) is the business school of the University of Pennsylvania, a private Ivy League research university in P ...
from 17 to 22 July. 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 Sept 22–27. DjangoCon 2021 took place virtually and in 2022, DjangoCon US returned to San Diego from October 16th to the 21st. 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, Australia, in July 2013, *
Brisbane Brisbane ( ) is the capital and most populous city of the states and territories of Australia, Australian state of Queensland, and the list of cities in Australia by population, third-most populous city in Australia and Oceania, with a populati ...
, Australia, in August 2014 and 2015, *
Melbourne Melbourne ( ; Boonwurrung/ Woiwurrung: ''Narrm'' or ''Naarm'') is the capital and most populous city of the Australian state of Victoria, and the second-most populous city in both Australia and Oceania. Its name generally refers to a me ...
, Australia in August 2016 and 2017, and * Sydney, Australia, in August 2018 and 2019. Django has spawned user groups and meetups around the world, the most notable group is the Django Girls 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 A 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 sapp ...
* Template::Swig for
Perl Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
*
Twig A twig is a thin, often short, branch of a tree or 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 twig bark are ...
for
PHP PHP is a General-purpose programming language, general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementati ...
and
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
* Jinja for Python * ErlyDTL for Erlang


CMSs based on Django Framework

Django as a framework is capable of building a complete CMS, however there are dedicated CMS projects which are built upon and extend the Django framework. Below is a list of a few of the more popular Django-based CMSs: * Django CMS *
Wagtail Wagtails are a group of passerine birds that form the genus ''Motacilla'' in the family Motacillidae. The forest wagtail belongs to the monotypic genus ''Dendronanthus'' which is closely related to ''Motacilla'' and sometimes included therein. ...
*
Mezzanine A mezzanine (; or in Italian, a ''mezzanino'') is an intermediate floor in a building which is partly open to the double-height ceilinged floor below, or which does not extend over the whole floorspace of the building, a loft with non-sloped ...


See also

* FastAPI * Flask *
Pylons project Pylons Project is an open-source organization that develops a set of web application technologies written in Python. Initially the project was a single web framework called Pylons, but after the merger with the repoze.bfg framework under the new n ...
* Web2py *
Tornado A tornado is a violently rotating column of air that is in contact with both the surface of the 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, alt ...
*
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 ...
* Comparison of web frameworks


References


Bibliography

* * * * * * *


External links

* {{DEFAULTSORT:Django Free software programmed in Python Python (programming language) web frameworks Software using the BSD license Web frameworks