Django

Django is, in the words of its own repository README, “a high-level Python web framework that encourages rapid development and clean, pragmatic design.” It originated not in academia or at a large technology company but inside a newspaper. According to the official FAQ, Django “grew from a very practical need: World Online, a newspaper web operation, is responsible for building intensive web applications on journalism deadlines.” World Online was the web department of a newspaper in Lawrence, Kansas, USA, the Lawrence Journal-World.

The project’s own history records that in the fall of 2003, the World Online developers Adrian Holovaty and Simon Willison “ditched PHP and began using Python to develop its websites.” The framework they built to meet daily deadlines was refined over the following two years, and “in summer 2005, World Online decided to open-source the resulting software, Django.” Naming the framework after the jazz guitarist Django Reinhardt, the team released it publicly in July 2005.

A defining trait of Django is its “batteries-included” philosophy: rather than asking developers to assemble a stack from separate libraries, it ships with a large set of integrated components out of the box. These include an object-relational mapper (ORM) for working with relational databases through Python classes, a templating system, form handling, authentication, and an automatically generated administrative interface that lets site managers edit content without custom code.

Django describes its own architecture using the MTV acronym rather than the more familiar MVC. As the FAQ explains, “if you’re hungry for acronyms, you might say that Django is a ‘MTV’ framework, that is, ‘model’, ‘template’, and ‘view.’” In this breakdown the “view” is the Python callback describing which data is presented, the “template” describes how that data is presented, and the framework itself fills the role of the controller. This terminology has caused recurring confusion for newcomers from MVC backgrounds, which the documentation addresses directly.

As a server-side framework, Django speaks to web servers through the WSGI standard, and its design has influenced a generation of full-stack Python web tools. It became one of the most widely deployed Python frameworks, powering large public sites and serving as a contrast to the microframework approach that Flask would later popularize: where Flask provides a minimal core and leaves choices to the developer, Django provides an opinionated, comprehensive stack aimed at getting complete applications shipped quickly.