From newsroom deadlines to free software
Django is born in an unusual context for a web framework: the online newsroom of the Lawrence Journal-World, a newspaper in Kansas. Developers Adrian Holovaty and Simon Willison need to build web applications under the constant pressure of journalistic deadlines: a new project every day, release times measured in hours, not weeks. From this concrete necessity emerges a framework that prioritises productivity and pragmatism.
Released as free software in July 2005 under a BSD licence, Django presents itself as a “batteries included” framework: everything needed to build a web application is already integrated, with no external dependencies to assemble.
The MTV architecture
Django adopts an architectural pattern it calls MTV (Model-Template-View), a variant of the classic MVC. The Model describes data structures through Python classes automatically mapped to relational database tables by the integrated ORM. The Template handles presentation with a safe markup language designed to be usable even by non-programmers. The View contains the application logic and returns the HTTP response.
Django’s ORM allows querying the database without writing explicit SQL: QuerySets are lazy, composable and translatable into optimised queries for the database in use — PostgreSQL, MySQL, SQLite and Oracle are natively supported.
Automatic admin and URL routing
One of the most distinctive features is the admin interface automatically generated from models: with a few lines of configuration, Django produces a complete back-office with listings, filters, search, pagination and editing forms. For many applications, the admin eliminates weeks of development.
The URL routing system maps web addresses to Python functions through regular expressions, making URL structure an explicit part of the application’s design. Django also includes a complete authentication system — users, groups, permissions, sessions — ready to use out of the box.
Security and conventions
Django integrates security protections as built-in defences: CSRF tokens, automatic escaping in templates, protection against SQL injection through the ORM, secure password management with hashing. The framework enforces conventions without removing flexibility, offering a balance between strong opinions and customisation possibilities that makes it suitable for both rapid prototypes and production applications.
Link: djangoproject.com
