What is Django (Python)?
Tags: django, python, beginners, tutorial
Published: 2020-07-20 14:15:10

[Django](https://djangoproject.com) is an open-source web framework written in the [Python](https://www.python.org) programming language. Named after the jazz guitarist [Django Reinhardt](https://en.wikipedia.org/wiki/Django_Reinhardt), it is used by some of the largest websites in the world including Instagram, Mozilla, and NASA, but also lightweight enough to be a popular choice for weekend side projects and startups. Its "batteries-included" approach means a powerful website can be generated quickly in the hands of a skilled developer.

## Web Framework
A "web framework" is software that standardizes and abstracts away common difficulties and redundancies involved in making a website. For example, most websites need to connect to a database, deploy to a server, handle URL routing, security, user registration, generate templates, and so on. In the early days, programmers had to do all of this from scratch but they quickly recognized the commonalities and started creating web frameworks.

These days, it is rare to write a website from scratch. Web frameworks exist for every modern programming languages including [Rails for Ruby](https://rubyonrails.org), [Express](https://expressjs.com) for JavaScript, and Django or Flask for Python.

Beyond the underlying programming language, the major difference between competing web frameworks is one of approach: Ruby on Rails and Django both adopt a "batteries-included" frameworks approach whereas Flask and Express are minimal microframeworks. You can think of it as the difference between being given a bag of Legos or a pre-built truck made out of Legos. Django and Rails are faster to start using and come with many built-in guardrails to prevent bad practices. Flask and Express require more customization upfront but allow for total control. See [Django vs Flask](https://learndjango.com/tutorials/flask-vs-django) for a detailed comparison of the two most popular Python web frameworks and the pros/cons of each approach.

## Python
Python is one of the most popular programming languages in the world because it is friendly to newcomers, extremely powerful, and has a robust ecosystem of libraries like Django that provide additional functionality. Python recently replaced Java as the [most popular programming language at top U.S. universities](http://cacm.acm.org/blogs/blog-cacm/176450-python-is-now-the-most-popular-introductory-teaching-language-at-top-us-universities/fulltext) and is growing rapidly among professional programmers as well, as evidenced by [its growth on StackOverflow](https://stackoverflow.blog/2017/09/06/incredible-growth-python/).

Python emphasizes readability and developer friendliness, as evidenced by its "Hello, World" syntax. Here it is in Python:

```python
print("Hello, World")
```

And here it is in Java:

```java
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); 
    }
}
```

Even if you know nothing about either programming language, it is clear at a glance that Python is the easier of the two to understand.

## Background
Django was initially developed by web programmers at the _Lawrence Journal-World_ newspaper, specifically Adrian Holovaty, Simon Willison, and Jacob Kaplan-Moss. It was first released to the public as an open source package in 2005 and is currently maintained by the non-profit [Django Software Foundation](https://www.djangoproject.com/foundation/). The source code is [freely available online](https://github.com/django/django).

## Key Features
Django adopts a "batteries-included" approach similar to Python and comes with a number of built-in features including an extensible authentication system, robust admin app, lightweight testing web server, and support for multiple databases including PostgreSQL, MySQL, MariaDB, Oracle, and SQLite. It is known for its leading security best practices and comes with comprehensive [documentation](https://docs.djangoproject.com/en/dev/), available either online or as a PDF/ePUB for offline consumption.

As a mature project, Django rarely makes breaking changes and has a clear deprecation schedule for any updates. A major new version is released every [nine months or so](https://www.djangoproject.com/download/) with monthly patch releases for security and bug fixes.

There is also a vibrant ecosystem of third-party applications--visible on the [Django Packages site](https://djangopackages.org/)--which provide additional functionality. Over time, the most popular packages are often rolled into Django itself.

## Community
A common saying among Django developers is "Come for the framework, stay for the community." It is known for being a welcoming and encouraging community, which is not always the case in technology. There are annual DjangoCon conferences hosted in the U.S, Europe, Australia, and Africa, as well as meetups in many major cities.

Questions about Django can be asked on the [official Django forum](https://forum.djangoproject.com/) and newcomers are encourage to [contribute to Django](https://docs.djangoproject.com/en/dev/internals/contributing/) itself.

The weekly [Django Chat](https://djangochat.com/) podcast features interviews with key figures in the community as well as deep dives on various core features. There is also a weekly [Django News](https://django-news.com/) newsletter with updates on events, tutorials, and third-party packages.

## Conclusion
If you'd like to learn more about Django and try it out yourself, there is an [official tutorial](https://docs.djangoproject.com/en/dev/intro/tutorial01/) as well as many more beginner friendly resources available on [LearnDjango.com](https://learndjango.com).