Django Developers Survey 2021

This is the official annual Django Developers Survey, conducted as a collaborative effort between the Django Software Foundation and JetBrains. In August 2021, more than 7,000 Django users and enthusiasts from almost 140 countries and regions took the survey to help us get a better idea of the current state of the framework and the ecosystem around it.

Check out the results of the Django Developers Survey 2022.

Django Usage

For what purposes do you mainly use Django?

Both for work and for my personal, educational, or side projects
Only for my personal, educational, or side projects
Only for work
66%20%15%

Only 15% of Django developers use it ONLY for work, while two thirds use it both for work and for personal, educational, or side projects.

Those who work alone are more likely to use Django for personal purposes.

According to the Python Developers Survey 2020, Django is the second most popular Python Framework.

It is in ninth place among all existing web frameworks based on the latest Stackoverflow survey.

What versions of Django do you use?> 100%

75%30%16%24%10%3%

24% of respondents still use Django 2.2, the previous long-term support (LTS) release before 3.2. You can find a list of supported versions here.

Even though v3.2 is used by three-fourths of Django developers, most of them use multiple versions.

For new projects, what version of Django do you use?

71%27%2%

Almost 30% of respondents use Django LTS for their new projects.

How often do you upgrade Django in your projects?

44%14%30%5%7%

Developers usually prefer to upgrade Django either with every stable release (44%) or only with a new LTS (30%).

Technologies and frameworks

What database backend(s) do you use?> 100%

77%41%30%10%2%2%6%

PostgreSQL is the most popular backend database, with a share of 77% (as the best-suited database for Django), while SQLite is the second most popular, with a share of 41%.

What cache backend do you use?> 100%

Redis47%Memcached18%Other2%None43%

Redis is the most popular cache backend, with Memcached coming in second (47% vs 18%). However, almost half of all respondents (43%) do not use any cache backend.

Memcached has existing native support and Redis support was added to Django 4.0, in large part based on last year’s Django survey results.

Developers with 11+ years of experience are the likeliest to use a cache backend. Those who tend not to use a cache backend include less experienced developers, freelancers, students, and the self-employed.

What GeoDjango backend(s) do you use?> 100%

72%22%7%2%1%1%

Only 28% of all respondents use GeoDjango, and most of them choose PostGIS as their backend.

What Django contrib apps do you find most useful?> 100%

84%80%49%49%46%33%27%24%17%16%12%11%6%4%3%1%

What are your 3 favorite core components?> 100%

72%49%33%28%26%15%14%13%11%9%5%5%4%3%1%

What template engine do you use?> 100%

Django templates79%Jinja214%Other1%None14%

What test frameworks do you use?> 100%

39%36%19%12%6%5%4%2%1%1%31%

The top three test frameworks for Django are pytest, unittest, and coverage.

What JavaScript framework(s) do you use?> 100%

37%37%28%10%5%3%1%1%4%20%

The two most popular JS frameworks are jQuery and React (both 37%), with Vue trailing them by 9 percentage points.

Interestingly, those who use Django for both work and personal purposes are more likely to choose Vue than those who use Django only for work (31% vs 21%), while for other frameworks the difference is much less pronounced.

36% of developers use React only for work, while 26% use it for personal or educational purposes.

What CSS framework(s) do you use?> 100%

68%15%14%12%6%3%2%2%1%4%16%

Almost 70% of Django users use one or more Bootstrap CSS frameworks. Less experienced coders are more likely to use Pure CSS than more experienced ones.

What are your 5 favorite third-party Django packages?> 100%

60%27%26%18%17%17%17%15%14%13%
All results

The more experienced the developer, the more likely they are to use django-debug-toolbar: it’s used by 12% of Django programmers with 1 year of experience but 40% of those with 11+ years.

Which async technologies do you use?> 100%

24%22%16%16%13%10%9%5%4%1%5%49%

Languages and other web-frameworks

Is Python your main programming language?> 100%

89% of Django developers use Python as their main language.

What other programming language(s) do you use in addition to Python?> 100%

75%64%47%37%20%19%16%14%11%9%5%3%3%6%4%

75% of Django developers also use JavaScript, and 67% use HTML/CSS.

What is your primary programming language?> 100%

This question was only shown to those who chose Python as a secondary language.

25%13%12%10%8%7%5%3%2%2%2%1%12%

After Python, the second primary language among Django users is JavaScript. C/C++ is third, and most of its users are either students or veteran developers with 11+ years of experience.

Other than Django, what web frameworks do you use?> 100%

32%32%30%27%20%9%8%5%4%3%
All results

The top 5 web frameworks used by Django developers are React.js, Flask, JQuery, Vue.js, and FastAPI. And quite often they are used together.

Which web framework do you use the most?> 100%

82%4%2%2%2%1%1%1%5%

Resources

Which of the following do you use to follow Django development?> 100%

53%31%20%19%16%11%10%10%10%6%6%5%3%2%20%3%

20% don’t follow Django news, though, and the majority of this group are beginners and developers with less than 1 year of experience.

More experienced developers prefer the Django News newsletter, Hacker News, RSS, and Twitter, while less experienced ones tend to use Stack Overflow and YouTube to follow Django development.

Which of the following do you prefer to use to learn Django?> 100%

78%46%41%31%18%9%5%5%3%

Please think of the web resources you read or follow for Django, excluding the official Django channels> 100%

YouTube channels52%Blog34%Podcasts25%Twitter handles13%Forum11%Other23%

Python Versions

What version(s) of Python do you use?> 100%

13%60%53%31%19%4%6%2%

3.9 and 3.8 are the most used Python versions among Django users.

Developers with 11+ years of experience use Python 2 at more than twice the rate of the rest (14% vs 6%).

Surprisingly, 13% selected Python 3.10, even though the survey was conducted in August 2021 but v3.10 was released later in October 2021.

What do you typically use to upgrade your Python version?>100

40%37%27%25%8%5%4%3%2%3%

People who use Django for personal or educational purposes, as well as specialists with less than 2 years’ experience, are more likely to upgrade their Python versions through Python.org or Anaconda.

The more experienced developers who use Django for work use specific tools more often, such as Docker containers and pyenv. OS-provided Python is widely used by all categories of developers.

Which of the following tools do you use to isolate Python environments, if any?> 100%

55%44%40%23%13%8%3%2%3%

Virtualenv is used by all categories of developers. Less experienced developers are more likely to choose Venv, while more experienced ones favor Docker.

What code formatters do you use?> 100%

35%
Black
30%
autopep8
18%
isort
2%
YAPF
4%
Other
35%
None

Among mypy users, the top code formatters are Black and isort, but pylint users tend to go with autopep8.

The Black code formatter is used by more experienced developers, while autopep8 is more often the choice of less experienced ones. For Python, autopep8 seems to be the default choice. Django has committed to adding official Black support in the future.

What linters do you use?> 100%

40%37%26%14%4%26%

91% of Flake8 users also use PostgreSQL. pylint is more popular among less experienced developers, while the more experienced ones tend to opt for Flake8.

Flake8 and pylint by years of Python experience> 100%

Flake8
pylint
3%/7%11%/24%31%/31%32%/23%23%/15%

Which top 5 Python packages do you rely on?> 100%

54%54%42%39%35%28%20%17%16%12%11%11%11%9%4%3%2%2%2%1%6%7%

Psycopg2 and Requests are the most used Python packages among Django users, each with 54%.

Requests is a popular platform among all Python developers, while Psycopg2 seems to be Django-specific.

Pillow, a module for working with images, is popular with less experienced developers.

Cloud

What cloud hosting platform do you use, if any?> 100%

43%27%25%13%11%8%6%1%1%12%19%

AWS is the most used cloud hosting platform.

There are more less-experienced developers among users of Heroku and PythonAnywhere than among users of other platforms.

Contrasting these results with those of the Python Developers Survey, Google Cloud Platform is used by 33% of Python developers (second most popular), but only by a quarter of Django developers (fourth). This trend is even more pronounced for Microsoft Azure, which is used by 21% of Python programmers but only 8% of Django programmers.

How do you develop locally for the cloud?>100

66%40%10%7%7%3%1%9%

How do you run code in the cloud (in a production environment)?>100

49%37%23%9%2%15%

Development Tools

What is your primary text editor or IDE?> 100%

42%38%7%5%2%2%1%3%

VS Code and PyCharm are the two most popular IDEs among Django developers.

Among less experienced developers VSCode is more popular, PyCharm seems to be preferred by veterans a bit more, and the two IDEs’ shares are about equal for those with 3–5 years of experience.

Primary text editor / IDE for professional and personal use.> 100%

Professional
Personal
40%/49%40%/29%7%/6%5%/6%2%/4%2%/1%1%/2%3%/3%

What is your primary local operating system?> 100%

42% of Django developers use Linux, more than any other OS. Windows and macOS are virtually tied with 29% and 28%, respectively.

What Continuous Integration (CI) system(s) do you use?> 100%

35%27%12%8%6%1%7%32%

In the Other category, respondents most often wrote in Bitbucket or Azure DevOps.

What configuration management tools do you use, if any?> 100%

20%7%2%2%1%4%68%

Only 32% of Django users use configuration management tools. “Custom solution” took second place with a 7% share.

Containers

Do you use Docker containers, or something similar?>100

62% of Django developers use containers.

What do you run inside Docker containers?>100

89%62%19%2%

During development, where do you run your code?>100

73%60%16%8%4%1%

How do you deploy code to remote containers during development?>100

65%41%39%14%4%

How do you debug your application?> 100%

72%56%40%2%

The more experienced developers tend to debug applications with shell/pdb more often.

Do you debug your application on remote hosts, or in containers?

I only use log statements
No
I frequently use a debugger on my application running remotely or in containers
I've attached a debugger once or twice
29%28%23%20%

What cache backend do you use?>100%

Redis is the most popular cache backend, with Memcached coming in second (47% vs 18%). However, almost half of all respondents (43%) do not use any cache backend.

Memcached has existing native support and Redis support was added to Django 4.0, in large part based on last year’s Django survey results.

Developers with 11+ years of experience are the likeliest to use a cache backend. Those who tend not to use a cache backend include less experienced developers, freelancers, students, and the self-employed.

Demographics

What is your current employment status?>100

61%11%9%9%4%4%2%

Django users freelance at twice the rate of developers in general: the share of freelancers in this survey is 11%, compared with just 5% in the total developer ecosystem and 6% in the Python Developers Survey.

What is your job role?>100

79%18%17%12%7%6%4%4%3%3%8%

What is your company size?

19%20%21%19%4%5%8%3%

Within your company, what size team do you work on?

12%64%14%6%2%2%

Django developers tend to work in small teams.

Do you work in a team or independently?

I work in a team
I work on my own project independently
I work as an external consultant or trainer
64%32%4%

How many projects do you work on?

I work on many different projects
I work on one main projects and several side projects
I only work on one project
49%36%15%

Which of the following industries best describes your company’s business?> 100%

36%8%6%5%4%3%3%2%2%2%2%2%2%2%1%1%1%1%1%1%1%12%

What is your professional coding experience?

11%17%24%19%29%

How long have you been programming in Python?

8%21%31%24%16%

What is your country or region?

13%9%5%5%5%4%3%3%2%2%2%2%2%2%2%2%
All results

Methodology and Raw Data

Want to dig further into the data? Download the anonymized survey responses and see what you can learn! Share your findings and insights by mentioning @jetbrains and @djangoproject on Twitter with the hashtag #djangosurvey.

Before dissecting the data, please note the following important information:

The data set includes responses only from official Django Software Foundation channels. After filtering out duplicate and unreliable responses, the data set includes more than 7,000 responses collected in August 2021 through the promotion of the survey on official Django channels, such as djangoproject.com and the DSF's Twitter account. In order to prevent the survey from being slanted in favor of any specific tool or technology, no product-, service-, or vendor-related channels were used to collect responses.

The data are anonymized, with no personal information or geolocation details. Moreover, to prevent the identification of any individual respondents by their verbatim comments, all open-ended fields have been deleted.

To help you better understand the logic of the survey, we are sharing the data set, the survey questions, and all the survey logic.

Download the Raw Data

Once again, on behalf of both the Django Software Foundation and JetBrains, we’d like to thank everyone who took part in this survey.

If you have any questions or suggestions, please contact us at surveys@jetbrains.com.