In the ever-evolving world of web development, staying informed about the latest trends and practices is crucial. The Django Developers Survey, now in its third year, serves as a vital pulse check for the Django community. Conducted as a collaborative effort between the Django Software Foundation and PyCharm, this comprehensive survey gathered insights from around 4,000 Django developers worldwide. The results not only shed light on the current state of the framework but also provide valuable insights into the preferences, tools, and practices that shape the Django ecosystem.

Django usage patterns

 One of the most striking findings of the survey is the versatility of Django’s usage. A significant majority of developers, 64% to be precise, leverage Django’s capabilities for both their professional projects at work and their personal endeavors. This highlights Django’s adaptability and its potential to cater to a wide range of development needs. However, 19% of respondents dedicated their Django skills solely to personal projects, while 18% utilized the framework exclusively in their work environment.

For what purposes do you mainly use Django?

When it comes to version preferences, developers displayed a keen interest in staying up-to-date with the latest releases. Django 4.2, 4.1, and 3.2 emerged as the most widely used versions, all of which were actively supported at the time of the survey. Impressively, 64% of developers opted for the latest stable release when starting new projects, while 32% favored the most recent Long-Term Support (LTS) version, prioritizing stability and long-term maintenance.

What versions of Django do you use?

Project creation workflows also revealed interesting patterns. A whopping 71% of developers preferred to start their Django projects from scratch, showcasing their confidence in building from the ground up. However, a notable 17% turned to Cookiecutter Django, a powerful tool that streamlines the setup process and provides a solid foundation for new projects.

Upgrade frequency is another crucial aspect of Django development. The survey found that 40% of developers consistently upgraded their Django version with each stable release, ensuring they had access to the latest features and improvements. On the other hand, 32% limited their upgrades to LTS versions, prioritizing long-term stability. Interestingly, 15% of respondents were early adopters, eagerly upgrading with every monthly point release to stay at the forefront of Django’s development.

Database and caching choices

When it comes to database choices, PostgreSQL reigned supreme among Django developers. An impressive 76% of respondents relied on PostgreSQL as their primary database backend, showcasing its robustness and compatibility with Django. SQLite secured the second spot with 43% usage, closely followed by MySQL at 30%. This distribution highlights the importance of considering project requirements and scalability when selecting a database solution.

what is prefered database for Django

Caching is another critical aspect of building high-performance Django applications. Redis emerged as the dominant caching backend, with 54% of respondents leveraging its capabilities. Memcached and local memory caching followed Redis in popularity, providing developers with options to optimize their application’s performance based on specific needs.

Interestingly, the survey revealed that the adoption of GeoDjango, Django’s geospatial extension, remained limited. A significant 66% of developers reported not using any GeoDjango backend in their projects. Among those who did utilize GeoDjango, PostGIS emerged as the most popular choice, with 24% of respondents leveraging its geospatial capabilities.

Django contrib apps

Django’s built-in contrib apps have always been a cornerstone of its ecosystem, providing developers with a set of powerful tools to streamline common development tasks. The survey highlighted the immense popularity of the admin app, with 77% of developers considering it indispensable. The admin app’s ability to quickly generate admin interfaces and simplify backend management has made it a go-to choice for many projects.

The auth app, which handles user authentication and authorization, also received significant acclaim, with 74% of respondents relying on it for user management. The auth app’s robust features and customization options have made it a staple in Django projects, saving developers valuable time and effort.

Other notable contrib apps that garnered attention include the postgres app (used by 47% of developers), the sessions app (utilized by 46%), and the staticfiles app (employed by 45%). These apps enhance PostgreSQL integration, handle user sessions and state management, and simplify static asset management, respectively.

Template engines and testing practices

Django’s template engine has long been a hallmark of its simplicity and flexibility. The survey confirmed that Django templates maintain their dominance, with 78% of developers preferring Django’s native templating system. Jinja2, though popular in its own right, trailed behind at 16% usage.

django template choice

Testing is an integral part of any software development process, and Django developers are no exception. The survey revealed that functional testing took the lead, with 51% of respondents prioritizing it to ensure code correctness. Regression testing (28%), QA testing (18%), and performance testing (17%) also received significant attention, highlighting the community’s commitment to delivering high-quality and reliable applications.

When it comes to testing frameworks, the dynamic duo of pytest and pytest-django have witnessed a surge in popularity. These frameworks simplify the process of writing and executing tests, making it easier for developers to maintain code quality and catch potential issues early in the development cycle.

Asynchronous programming and frontend frameworks

As web development evolves, so do the technologies and approaches used by Django developers. Asynchronous programming has gained significant traction in recent years, and the survey results reflect this trend. Async technologies like ASGI, asyncio, and FastAPI have experienced notable growth in adoption, enabling developers to build performant and scalable applications.

Async Django

On the frontend side, Tailwind CSS has emerged as a rising star among CSS frameworks. The survey revealed that Tailwind CSS has doubled its popularity over the past two years, reaching an impressive 29% adoption rate in 2023. This surge in popularity can be attributed to Tailwind CSS’s utility-first approach and its ability to streamline the styling process. In contrast, Bootstrap, once the dominant CSS framework, has seen a decline in usage, settling at 56%.

JavaScript frameworks also play a crucial role in modern web development, and Django developers have their favorites. React maintained its position as the most popular JavaScript framework, with 27% of respondents leveraging its component-based architecture. Vue.js secured the second spot, with 14% of Django developers embracing its simplicity and flexibility.

Interestingly, the survey highlighted that 73% of developers utilize Django as a full-stack framework, harnessing its capabilities for both backend and frontend development. However, a significant portion (61%) also combines Django with the Django REST Framework to build robust APIs, showcasing the framework’s versatility in various architectural patterns.

Development tools and environments

The tools and environments used by developers play a vital role in their productivity and workflow efficiency. The survey revealed that VS Code has emerged as the preferred Integrated Development Environment (IDE) among Django developers, with 47% of respondents choosing it as their go-to tool. PyCharm, once the leader in the Django IDE space, followed closely at 29% usage.

When it comes to operating systems, Linux and macOS were neck and neck as the primary choices for Django development. This highlights the importance of Unix-based systems in the developer community. Interestingly, Windows with WSL (Windows Subsystem for Linux) was used by 19% of respondents, indicating a growing adoption of Windows as a development platform.

Continuous Integration (CI) systems have become an essential part of modern development workflows, and GitHub Actions has taken the lead in this regard. The survey found that 45% of respondents rely on GitHub Actions for their CI needs, capitalizing on its seamless integration with the GitHub ecosystem. GitLab CI and Jenkins also maintained a significant presence as popular CI choices.

Infrastructure-as-Code (IaC) has gained prominence in recent years, and Terraform has emerged as the go-to tool for Django developers. With 20% of respondents using Terraform, it has become a crucial component in managing and provisioning infrastructure. Other IaC tools like AWS CloudFormation and Pulumi also have a notable presence, catering to specific cloud platforms and requirements.

Python versions and package management

Python, the backbone of Django, continues to evolve at a rapid pace. The survey results highlight that Python 3.11 has already become the new standard for Django development, with an impressive 65% usage rate. Python 3.10 follows closely behind, with 46% adoption. This swift uptake of the latest Python versions showcases the Django community’s commitment to staying on the cutting edge of the language’s development.

Virtual environments have long been the preferred approach for isolating Python dependencies and managing project-specific packages. The survey confirmed this trend, with 55% of developers relying on virtual environments to maintain a clean and consistent development environment. However, Docker is rapidly gaining ground, with 44% of respondents leveraging containerization for their Python projects. This shift towards containerization highlights the growing importance of reproducibility and portability in modern development workflows.

Code formatting tools have become an essential part of maintaining code consistency and readability across projects. The survey revealed that Black and isort have emerged as the frontrunners in this space. These tools automatically format code according to predefined style guides, ensuring a uniform and clean codebase.

When it comes to essential Python packages for Django development, the survey highlighted several key players. Psycopg2, the PostgreSQL database adapter, topped the list, emphasizing the importance of robust database connectivity. Requests, the popular HTTP library, was also widely used, simplifying API integrations and web scraping tasks. Other notable packages included gunicorn for server management, Celery for asynchronous task processing, and pytest for streamlined testing.

Cloud hosting and deployment

Cloud hosting has revolutionized the way Django applications are deployed and scaled. The survey results showed that AWS EC2 is the top choice for cloud hosting among Django developers, with 44% of respondents relying on it for their deployment needs. DigitalOcean secured the second spot, with 28% of developers leveraging its simplicity and affordability.

Interestingly, Heroku, once a popular choice for Django deployments, faced a significant decline in usage. The survey revealed that Heroku’s usage dropped to 16%, largely attributed to the elimination of its free tier plans. This shift has prompted developers to explore alternative hosting platforms that offer more flexibility and cost-effectiveness.

Containerization has emerged as a dominant trend in application deployment, and Django developers are embracing it wholeheartedly. The survey found that 51% of respondents opt for containerization to run their code in the cloud, leveraging the portability and isolation benefits of containers. Virtual machines, on the other hand, are still relied upon by 36% of developers for their deployment needs.

When it comes to container orchestration, Amazon ECS/Fargate has taken the lead, becoming the most popular choice among Django developers. Kubernetes and Amazon EKS follow closely behind, providing powerful and scalable options for managing containerized applications.

Demographic landscape

The Django community is diverse and encompasses developers from various backgrounds and experience levels. The survey shed light on the employment status of Django developers, revealing that 64% of respondents are fully employed by companies. Additionally, 10% of developers are self-employed, while 8% work as freelancers, highlighting the flexibility and entrepreneurial spirit within the community.

In terms of job roles, developers, programmers, and software engineers make up the majority, with 78% of respondents identifying as such. However, the Django community also includes team leads, architects, CTOs, and data professionals, showcasing the wide range of expertise and responsibilities within the ecosystem.

Team sizes also vary within the Django community. The survey found that 55% of developers work in small teams of 2-7 people, fostering close collaboration and agility. Larger teams are less common, with only 8% of respondents working in teams of more than 20 individuals.

Industry representation within the Django community is diverse, with IT/software development taking the top spot at 32% of respondents. Other notable industries include accounting/finance/insurance (7%) and manufacturing (6%), highlighting Django’s applicability across various sectors.

Experience and age distribution

The Django community comprises developers with varying levels of experience and expertise. The survey revealed that 32% of respondents have an impressive 11+ years of professional coding experience, bringing a wealth of knowledge and insights to the ecosystem. On the other hand, 24% of developers have 3-5 years of experience, indicating a significant influx of newer talent into the community.

When it comes to Python experience specifically, 33% of respondents have been using the language for 3-5 years, while 24% have 6-10 years of Python experience. Remarkably, 21% of developers have been working with Python for 11+ years, showcasing the language’s longevity and the deep expertise within the Django community.

Age distribution within the Django community is also diverse, with the 30-39 age range constituting the largest group at 38%. The 21-29 age group follows closely at 30%, highlighting the appeal of Django among younger developers. The 40-49 age group represents 18% of the community, bringing a balance of experience and fresh perspectives.

Geographic spread

Django’s popularity extends far beyond any single region, with the framework being adopted by developers worldwide. The survey results provide insights into the geographic distribution of the Django community.

Europe emerges as the leading continent, with 44% of respondents based in European countries. North America follows closely at 19%, showcasing Django’s strong presence in the western hemisphere. Asia represents 17% of the Django community, highlighting the framework’s growing adoption in the eastern regions.

On a country level, the United States leads the pack, with 24% of respondents hailing from the US. India follows at 7%, underscoring Django’s popularity in the South Asian region. Germany and the United Kingdom each contribute 5% of the community, reflecting Django’s strong foothold in Europe.

django locations

Notably, emerging markets such as South America and Africa are also making their mark in the Django ecosystem. South America accounts for 7% of respondents, while Africa represents 6% of the community. This growing adoption in diverse regions underscores Django’s increasing global reach and its potential to empower developers worldwide.

Conclusion

The 2023 Django Developers Survey paints a comprehensive picture of a thriving and evolving framework. Django’s versatility, coupled with its active community and a wide array of tools and libraries, has solidified its position as a top choice for web development.

The survey results highlight Django’s adaptability to various project types and scales, from personal endeavors to enterprise-level applications. Developers actively embrace new releases, tools, and best practices, ensuring they stay at the forefront of web development trends.

The Django community itself is a melting pot of experience levels, age groups, and geographic backgrounds. This diversity fosters innovation, collaboration, and knowledge sharing, enabling the framework to continuously evolve and meet the changing needs of developers worldwide.

As the Django ecosystem continues to thrive, with a wide range of packages, integrations, and tools at developers’ disposal, the future looks bright for this powerful web framework.

Categorized in:

MLOps, Programming,

Last Update: 10/05/2024