In the dynamic world of web development, handling high-volume, asynchronous tasks efficiently is crucial for scalable applications. "Efficient Django: Mastering Asynchronous Tasks with Celery, RabbitMQ, and Redis" is an in-depth, 3-hour hands-on workshop designed for Django developers looking to enhance their skills in managing asynchronous workloads. This session delves into the practical implementation of Celery for task queuing, RabbitMQ as a message broker, and Redis for result storage and caching. Participants will learn how to set up and optimize Celery with Django, configure multiple queues, schedule tasks with Celery Beat, and implement robust retry mechanisms. By exploring real-world use cases, this workshop equips developers with the knowledge to build more resilient, efficient, and scalable Django applications.
Join us at Django US 2024 for an exciting tutorial 🎓, where we'll dive into the world of web APIs using Python's beloved Django framework and the Django Rest Framework. This session is perfect for Python enthusiasts 🐍 eager to expand their web development skills in a practical, hands-on environment.
What You Will Learn
- 🔍 Introduction to API Development with Django: Understand the basics of API construction and the role of Django and Django Rest Framework in modern web development.
- 📊 Django Models: Explore how to create and utilize Django models, the backbone of data handling in Django applications.
- 🔗 URL Mapping and Views: Master URL configuration for efficient API endpoint creation and discover how Django views and ViewSets drive your API's functionality.
- 🔄 Serializers in Action: Learn to implement serializers for converting data formats, a critical step in RESTful API development.
- 💻 Practical Application: Engage in hands-on coding to apply these concepts in building a functional API from scratch.
Why This Tutorial?
This tutorial is tailored for those ready to step into API development with Django. We focus not just on theoretical knowledge but also emphasize practical skills. By the end of this session, you'll have a clear understanding of the essential components of Django for API development and hands-on experience in building an API.
Are you already navigating the Django landscape and seeking to deepen your expertise? 🌱 This tutorial provides an immersive opportunity to advance your web development skills and explore the intricacies of API development using Django and the Django Rest Framework. 🚀 Join us for an enriching journey as we delve into mastering the art of building powerful APIs with Django!
Explore essential Django DevOps practices in this interactive tutorial session focusing on delivery / deployment, monitoring and optimization. Learn to implement CI/CD pipelines with CircleCI and GitHub actions, use Docker for reproducible builds, monitor application health, and optimize performance. Ideal for developers looking to elevate their DevOps capabilities with Django.
Of the multiple obstacles that get in the way between good intentions and successful software documentation, the most difficult to overcome is a lack of confidence. It's very hard to make progress in any endeavour, if you're assailed by doubts that you are doing the right thing or doing it the right way.
This workshop introduces a repeatable, reusable approach to the documentation confidence gap. It will help get work started and then helps keep it moving. We'll apply it - from the very first few minutes of the workshop - to participants' real-world documentation challenges.
The methods, tools and principles that this workshop introduces have been developed and refined over years, and put into practice at scale. They are systematic and proven.
I have run this workshop multiple times, with consistently effective results for participants and their documentation projects.
An astonishing 96.3% of websites have accessibility issues. As a Django developer, you can be a part of the effort to turn that number around.
In this workshop, we’ll introduce you to the Web Content Accessibility Guidelines (WCAG) and show you practical ways to incorporate accessibility into your web development. We’ll build a blog website using a Django-powered content management system called Wagtail and demonstrate how you can make your project more accessible as you go. We’ll show you how to customize Wagtail’s built-in accessibility tools to continuously test and improve your website accessibility over time.
To benefit the most from this tutorial, students should have at least some basic knowledge of Python and Django. A laptop with Python 3.11 or above installed on it is required to participate in the hands-on exercises.
Python scripts often rely on dependencies, which can make the sharing of code a more complex process. This process has been streamlined with the introduction of PEP 723, which allows dependencies information to be embedded in the same file as the code.
By leveraging this, Django developers can eliminate the need for complex setup instructions when sharing their code. In this talk, we are going to dissect the utilization of this method while using it in Python scripts with different dependencies.
The single-page application pattern (SPA) is the current prevalent pattern for web development. It renders websites using JavaScript frameworks like React, Angular, and VueJS. However, browser standards have evolved, and the case for using a server-rendered application pattern is strong and has become even stronger with frameworks like HTMX.
Neither pattern is the best in every circumstance, so in this talk, you'll learn factors to consider when evaluating your web stack, and you'll be able to confidently choose the pattern that will set you up for success.
Most people only use the builtin path converters. We show how one can not only add a custom pattern, but also automatically convert this to a Python object, and even to a (lazy) model object. This can reduce the number of roundtrips to the database. We also show how we can use this to "stack" queries together, and for some databases, use only one query to fetch all objects. Finally we show how we can programmatically check if two URL paths overlap (completely).
Django Ledger provides insights into financial decisions and helps users take immediate action. Developers can benefit from Django Ledger's capabilities to implement transaction blueprints, enabling them to streamline their projects. For accountants and business owners, Django Ledger offers instant financial stats and insights. The platform serves as a bridge between developers and financial professionals, facilitating collaboration and understanding. Django Ledger aims to break down barriers and create new possibilities for innovation and growth in the tech and finance world.
In "Error Culture," I delve into the overlooked issue of disregarding error alerts in tech environments, a practice that stems from alert overload and leads to critical oversights. I dissect the roots, including alert fatigue and a culture that undervalues preventative measures, and highlight symptoms like excessive reliance on email filtering. My talk proposes actionable solutions to ensure alerts are meaningful and directed at the right people, advocating for a shift towards a culture where alerts enhance organizational efficiency and resilience. Join me as I offer insights into transforming error management from a neglected aspect into a cornerstone of proactive organizational strategy.
This examines the distinct challenges and advantages of overseeing projects within the open-source realm. It investigates the core tenets of collaborative development, decentralized decision-making, and community-centric innovation that characterize open-source endeavors.
Using concrete illustrations and actionable insights, it underscores approaches for successful project management especially for beginners and also professionals.
These include cultivating transparency, harnessing varied skill sets, promoting inclusivity, and managing the dynamics of teams driven by volunteers. Participants will emerge with a richer comprehension of the complexities visible in guiding open-source endeavors and the potential for effecting meaningful change through collaborative project management methodologies that involve participation and inclusivity.
This talk will offer an opinionated guide to the enhanced capabilities of modern Django forms, demonstrating how recent improvements align with the broader trend towards streamlined, HTML-centric web development.
Troubleshooting isn't just a job skill - it's a way of life. The skill of effective troubleshooting opens doors and can help you solve problems in any field. In this comprehensive talk on problem-solving you'll learn how to break down complex issues, utilize the tools at your disposal, and avoid tunnel vision, whether you are working on a problem with a django project, a multi-million dollar radar system, or your kid's toy robot.
Attendees will embark on a journey to unveil concealed pathological queries using the powerful django-debug-toolbar. Geared towards beginners seeking to enhance their understanding of the HTTP request-response cycle, this session will provide a foundational deep-dive into query optimization more generally, as well as how to pinpoint and improve pathological queries in an empirical manner.
The Python geospatial tools ecosystem has been growing very fast, changing how people can access and visualize geospatial data; with the new tools, people can make deeper analyses and gain insightful visualization of the location data. This talk will aim to provide an introduction and guide on the most used and helpful geospatial tools in Python.
Abstract:
PyClubs, an initiative of Python Ghana, is a transformative endeavor aimed at empowering tertiary students in Ghana through the adoption and mastery of Python programming skills. As a collaborative effort between Python Ghana and tertiary institutions across the nation, PyClubs serve as vibrant communities where students can enhance their Python proficiency, engage in collaborative projects, and connect with like-minded peers.
This abstract sheds light on the significance of PyClubs as a catalyst for skill development, community engagement, and career advancement among tertiary students. By leveraging Python Ghana's expertise, resources, and networks, PyClubs provide students with a platform to not only acquire technical skills but also cultivate essential soft skills such as communication, teamwork, and problem-solving.
Furthermore, PyClubs foster a culture of inclusivity and diversity, welcoming students from all backgrounds and skill levels to participate and contribute. Through workshops, coding challenges, and industry networking events, PyClubs offer students valuable opportunities to expand their horizons, explore diverse career paths, and gain insights into industry trends and best practices.
Attendees of this talk will gain insight into the collaborative efforts between Python Ghana and PyClubs in driving innovation, excellence, and inclusivity in Python education. They will be inspired to join PyClubs initiatives, leverage Python Ghana's resources, and embark on a journey of personal growth, professional development, and community engagement. Join us in this exciting endeavor to empower tertiary students through PyClubs and Python Ghana.
Password have been the nightmare of website admins for decades. Nobody wants to risk breaches compromising passwords, that are likely to be reused on sites that might be even more important than yours. We've tried a bunch of techniques, all with annoying usability or security trade-offs. But now there's a new tool, and one that brings the goods that can make passwords a relic of a bygone era.
Join Amanda Savluchinske, a Product Manager at Vinta Software, as she shares insights on navigating the world of product management for techies and tech teams. In this talk, Amanda emphasizes the essentials of what Product Managers truly want from their tech counterparts: a strategic mindset, a passion for problem-solving, and empathy for end users.
Learn practical tips on bridging the gap between technical and non-technical roles, while understanding the nuances of key execution strategies, drawing from industry best practices such as "Inspired", by Marty Cagan. Explore the product lifecycle, delve into metrics, and gain insights into roadmapping, product discovery, and testing.
This talk will touch on strategies and challenges we have encountered along our journey of hosting over 1,000 Django/Wagtail sites. Told in the storybook style of "One Thousand and One Nights" (a.k.a. "Arabian Nights") this talk will feature real-world anecdotes about: technical architecture, business challenges, financial challenges, customer support, and security challenges such as dealing with onslaughts of spammers and attack vectors.
URLs are meant to never change, but change is the only constant of thriving products. As web developers we have the duty to not only design our URLs in a way that they withstand the passage of time, but also to "never" break old URLs when, in the face of inevitable change, we are forced to re-design them in order to keep a consistent experience in our evolving products. Join me in this practical journey to master URL design and evolution.
I first learned Django back in 2018 at a university in Indonesia. In 2019, I took a deep dive into Django's codebase. Five years later, I got a job in the UK and gave talks at conferences in the US and Europe, including this one.
This is a story of how Django changed people's lives – and how you played a part in it.
Learn to secure your Django apps by attacking (and then securing) Pygoat - An intentionally vulnerable Python Django application. Explore the OWASP top 10 vulnerabilities and understand how to mitigate them from Django apps.
Unleash the full potential of your Django application? Join me as we deep dive into the world of Django performance optimisation. In this talk you will learn about benchmarking and profiling your Django application. You will be able to identify performance bottlenecks and uncover the hidden secrets. Don't settle for less you deserve better...join.
Entering my current role, my expertise leaned towards backend/frontend development, with limited exposure to database management. As is often the case with evolving applications, our database schema underwent frequent changes driven by user requests for new features or enhancements to existing ones. Up until that point, I had only worked within an environment where the database was seamlessly integrated with Django's framework. I never even had to open up the applications' migrations folders. However, transitioning into my current role, I encountered unexpected challenges related to database intricacies and migrations, which demanded a deeper understanding and a more nuanced approach to managing the fast changing database. In this presentation, I will discuss my approach to converting an existing MySQL database to be fully managed by the Django migrations framework, as well as give an easy to understand explanation of what is going on under the hood.
Alpine.js and htmx have been creating quite a flurry of excitement in the Django community for a few years now. How is this toolset combination holding up in the light of some years of real project experience? Come to our talk to learn the impact this toolset has had on our productivity.
Lower costs and increase performance by optimizing how your app uses PostgreSQL. Learn the best strategies on data modeling, triggers, full-text search, bulk data import/export, and more to handle millions of rows with ease.
The Django Software Foundation's annual budget is roughly US $250,000. This is perhaps large by open source project standards, but it's quite tiny relative to the size and scope of the global Django community. The DSF has lofty ambitions, but is often hamstrung by lack of funds. In this talk, I'll break down how the DSF spends its budget, speculate on what we'd be able to accomplish with a much larger budget, and talk about how we might get from here to there.
Keeping in mind the Pythonic principle that “simple is better than complex” we'll see how to create a web map with the Python based web framework Django using its GeoDjango module, storing geographic data in your local database on which to run geospatial queries.
At some point within a developer's career, they are eventually going to come across a legacy application using an unsupported version of a framework that they will be responsible for maintaining. This talk will cover how to best approach an upgrade path in the Django ecosystem, starting from any version of Django to V5.
"Finding 2.0" explores the parallels between software versioning and personal development. Whether facing health struggles, burnout, or feeling aimless, this talk provides practical insights and actionable steps for rewriting the code of your life and embracing a future of health and fulfillment.
Lots of companies are investing in end to end testing to release high quality software and remain competitive in today’s market. Now with libraries like Cypress and Playwright, end to end testing Django applications have become very intuitive and a whole lot of fun.
Over the years, after working with these tools, there are many lessons that I have learned the hard way. These valuable lessons taught me how to write robust and reliable tests that vastly improved the quality of my applications.
In this session, let's discuss best practices that I found useful to write E2E tests. These guidelines will enable you to release high quality software to your clients.
Whilst developing financial and transactional systems, database integrity is a critical aspect ensuring trust, reliability, and accuracy.
While developing a Ledger system, I discovered that whereas immutability of transactions is an intrinsically obvious practice among database engineering folk, it has to be an intentional action in Software Development practice. This talk explores the concept of database integrity within this context, highlighting key principles and practices that safeguard data consistency, accuracy, and reliability using the django ORM.
Tech is attractive to folks because of the pay and the standard of living it provides. However, if you come from a background where you have no financial education beyond, you may accumulate less wealth than you could. I will share my story, background, the mistakes I've made and how I operate now in the hopes of making it a little easier to discuss in the future.
In the world of Django development, ensuring optimal performance is paramount for building robust and scalable web applications. Have you ever felt that your Django application is sluggish? You might be facing the infamous N+1 query problem, a notorious performance bottleneck that arises when dealing with ORM-based database queries.
This presentation dives into the world of N+1 queries, explaining how they occur and their impact on performance. We'll explore practical solutions to optimize your code and eliminate these performance bottlenecks.
In this session, we will learn to identify N+1 queries and understand their consequences. We will look into techniques to fix N+1 queries and keep our Django app running smoothly. Additionally, we will take a deeper dive into N+1 queries, exploring advanced optimization strategies like lazy loading, prefetching, and utilizing Django's ORM features like select_related and prefetch_related. Attendees will get a sneak peek into debugging methods, exploring how to use tools like the Django Debug Toolbar and SQL logging to identify and resolve issues.
By the end of this session, you'll be equipped to:
Identify and diagnose N+1 queries in your Django projects.
Implement effective solutions to optimize your application's performance.
Utilize debugging tools and techniques to pinpoint and fix N+1 query issues.
This presentation is suitable for Django developers of all experience levels, as well as for those who might not be working on Django but use other ORM-based frameworks.
Plugins offer a powerful way to extend software packages. Tools that support a plugin architecture include WordPress, Jupyter, VS Code and pytest - each of which benefits from an enormous array of plugins adding all kinds of new features and expanded capabilities.
Adding plugin support to an open source project can greatly reduce the friction involved in attracting new contributors. Users can work independently and even package and publish their work without needing to directly coordinate with the project's core maintainers. As a maintainer this means you can wake up one morning and your software grew new features without you even having to review a pull request!
There's one catch: information on how to design and implement plugin support for a project is scarce.
I now have three major open source projects that support plugins, with over 200 plugins published across those projects. I'll talk about everything I've learned along the way: when and how to use plugins, how to design plugin hooks and how to ensure your plugin authors have as good an experience as possible.
Let's work better together! Positive asynchronous working relationships have always been a core feature of what makes Django successful. Let's examine some of our hard-earned institutional knowledge in order to foster lasting positive working relationships with clients, stakeholders, and coworkers.
Django migrations are great, but applying them safely in a busy system can be tricky. This talk looks at the challenges of deploying migrations multiple times per day across systems in multiple time zones.
Reducing your project’s carbon footprint by 90%: that’s the official target, for teams with formal Net-Zero commitments. With the right expertise, tools, and architecture, it’s possible today. We’ve delayed climate change action enough already – in this talk, we’ll learn where carbon emissions are coming from in a Django project, and how to reduce them 10x across all parts of the stack.
Domain knowledge doesn’t always translate directly across software frameworks, and there is no “translation dictionary”. For Rails developers/teams making the switch to Django: there is good news! Understand the mindset of the framework’s architects, learning the [abstracted] function of critical packages, and fresh perspective will get you very far.
My company built CHAMP, the online application for state-aided subsidized housing for the state of Massachusetts. We did it in Django. This site is used to find housing for thousands of low-income and homeless applicants a year. The site handles over 10,000 monthly users at all times of day. We've supported it in production for over five years, and deployed major new features continuously throughout that time.
In this talk, we'll cover the best tricks of Django we used to build the site, as well as the biggest challenges we faced and how we solved them. This includes:
* Using Django with Vue
* Keeping the site running well despite high user load
* Managing duplicate applications in the system
* Regularly replicating gigabytes of data to a data warehouse
* Migrating data from 230 organizations into the system
* And more!
HTML suffers from verbosity and lots of copy-pasta driven development. CSS tends to bleed into important! overrides hard to maintain. React and Vue frameworks bring in extra complexity that might not be needed for a composable UI library.
In this talk we will cover different ways to architecture our templates and styles for reusability and maintanability using some techniques and libraries (like django-components, wagtail, crispy-forms, tailwindcss) to rapidly prototype and build modular websites, matching the composability of modern frontend frameworks for the working developer.
OpenTelemetry (OTel) is a comprehensive suite of APIs, libraries, and tools designed to collect, generate, and export telemetry data, including metrics, logs, and traces, from software applications. This talk will cover critical concepts related to OTel and show you how to integrate it into your Django app.
Django 5.1 just released in August and, already, Django 5.2 is in progress.
In this talk I will highlight the progress of the 5.x series that is often understated in the release notes.
How did a handful of nerds and a small midwestern newspaper end up creating and then releasing Django? As Django approaches it's 20 year anniversary next year it is time to share and record some of these old stories before they are lost forever.
In the dynamic world of web development, Django and Celery form a passionate couple, creating a great environment for asynchronous capabilities without chaos. This talk explores their relationship, from the initial spark of integration to overcoming the hurdles of performance optimization and data integrity.
Dive into the heart of their connection, where Django seamlessly orchestrates Celery's asynchronous dance but knowing every love story has its challenges. We'll explore the pitfalls of outdated data, duplicate runs, and conflicting operations, offering practical solutions to keep the romance alive.
In the quest for blissful coexistence, we share couples therapy tips for Django and Celery, from managing retries with grace to navigating the boundaries of their relationship. As we embark on this journey, we empower developers to unlock the full potential of Django and Celery, transforming their web applications into dynamic, high-performance marvels.
Yes, it is possible to add audio/video conferencing to a Django web site. But Django can't do it alone. WebRTC (Web Real-time Communication) is a point-to-point protocol, and a number of different things need to happen before those connections can be established. Django, Channels, HTMX and coturn can all be combined to create a system capable of allowing live conversations among individuals
Lace up your boots and let’s take a hike through your Postgres database internals. We’ll first step off the beaten path of the ORM and start our hike learning commands for interacting with the Postgres command line, psql. We’ll climb through some of Postgres’ system tables and special functions that tell you about your database from the inside. We’ll train your eyes on several important signs for debugging and knowing what’s going on inside your database. I’ll include special stops for looking at activity, queries, locks, and connections.
In this presentation, we'll delve into the realm of video streaming with Django, challenging the notion that it hasn't been an ideal fit so far, as commonly expressed. Join us on a journey where we'll explore the step-by-step implementation from scratch. Alongside, we'll share a real-life narrative detailing how our company successfully arrived at this innovative solution. From grasping protocols to media processing and scaling considerations, this talk covers it all!
A deep dive into Django's default User model, looking at its historical origins, current usage with authentication, and potential future.
The last couple of years seem to have changed everything. From "API First" we've gone to "API Maybe". This is the story of bootstrapping a new application in these latter days, the lessons we've learnt, and what the future might bring.