Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Weeknotes (2024 week 51)
Weeknotes (2024 week 51) Building forms using Django I last wrote about this topic in April. It has resurfaced on Mastodon this week. I’m thinking about writing a feincms3-forms demo app, but I already have too much on my plate. I think composing a forms builder on top of django-content-editor is the way to go, instead of replacing the admin interface altogether – sure, you can always do that, but it’s so much less composable… Releases blacknoise 1.2: No real changes, added support for Python 3.13 basically without changing anything. It’s always nice when this happens. django-imagefield 0.21 django-prose-editor 0.10: I rebuilt django-prose-editor from the ground up and wrote about that two weeks ago. The 0.10 release marks the final point of this particular rewrite. django-js-asset 3.0: See the blog post from this week -
Django News - Django 6.x Steering Council Election Results - Dec 20th 2024
News Django 6.x Steering Council Election Results Congrats to our new Steering Council members. Carlton Gibson Emma Delescolle Frank Wiles Lily Foote Tim Schilling djangoproject.com Django Reached 100%+ Funding! Django successfully reached its funding goal of $200,000 for 2024. It speaks to the volunteer-nature of the project that something with so many moving parts and active contributions can thrive on such a relatively limited budget. djangoproject.com Python Insider: Python 3.14.0 alpha 3 is out This is an early developer preview of Python 3.14 featuring several major new features compared to Python 3.13. blogspot.com Django Software Foundation Today 'Updates to Django' is presented by Velda Kiara from Djangonaut Space! Last week we had 14 pull requests merged into Django by 11 different contributors - including 3 first-time contributors! Congratulations to Juan Pablo Mallarino, Ben Cardy, and amansharma612 for having their first commits merged into Django - welcome on board!🎉 Here are some highlights from the recent updates coming to Django 5.2: The migrate and runserver commands now respect the requires_system_checks override, running only the checks tagged with the specified tags. A new hook, get_check_kwargs(), allows for further customization. django.urls.reverse has been enhanced to support query strings and URL fragments, offering more … -
Object-based assets for Django's forms.Media
Object-based assets for Django’s forms.Media The pull request for adding object-based script media assets into Django is in a good state and I hope it will be merged soon. I have been using object-based assets long before Django actually added support for them in 4.1 (since 2016, that’s before Django 1.10!) by using a gross hack. Luckily I have been able to clean up the code when Django 4.1 landed. I have been asking myself at times why I haven’t proposed the change to Django myself despite having been a user of something like this for such a long time. After all, I have been happily contributing issue reports, bug fixes and tests to Django. The process of adding new features sometimes is terribly frustrating though even when looking (and cheering) from the sidelines. It feels bad that adding another package to the list of packages I maintain so clearly seems to be the better way to get things done compared to proposing a new feature for Django itself. I hope processes change somewhat. But I digress. The ProseEditorWidget in django-prose-editor wants to ship CSS, JavaScript and some JSON to the browser for the widget. So, of course I used … -
Django Quiz 2024
Yesterday, I held another quiz at the December edition of Django London. The quiz is a regular tradition at our meetup, a way of having a more relaxed event in December and giving away some nice prizes. This was the sixth quiz that I’ve presented, and the seventh overall. Here’s an action shot taken by my co-organizer Çağıl: And below is the quiz itself, so you can try it at home. Answers follow at the end, with some extra explanation. Dates refer to December 2023, so if you’re reading in the future, take that into consideration. Enjoy! The quiz 1. What is the default port that runserver uses? 8080 8000 8888 404 2. In which month of this year was Django 5.1 released? May August October Undecember 3. What company initially developed Django? Instagram Mozilla Lawrence Journal-World ACME Web Frameworks Inc. 4. What is the CSS selector that ORs a list of selectors? :is() :or() :any() :is-one-of-these() 5. What is the name of the new middleware that requires authentication by default? LoginRequiredMiddleware AuthenticationMiddleware PrivateEverywhereMiddleware FinallyNoMoreAccidentallyPublicViewsMiddleware 6. What is the name of the Django contributor accelerator program? Djangonaut Space Pony Express Astronaut Django All Djangoes Go 7. Which model field would … -
Reflections on DjangoCon US 2024: Highlights, Takeaways, and Community Connections
DjangoCon 2024 was a resounding success for the community, with attendees from all over the world gathering to learn about the latest developments in Django and to connect with the Django community. Caktus was well-represented at the conference, with six of our team members attending. In this blog post, we share our experiences at DjangoCon 2024, including our favorite talks, the people we met, and the things we learned. We also offer some tips for future attendees on how to get the most out of DjangoCon. What did you like most about DjangoCon 2024? Keanya: What I loved most about DjangoCon 2024 was the people. DjangoCon is a celebration of community. I especially appreciated how welcoming the environment was. Whether you’re a seasoned contributor or someone attending their first conference, you’re made to feel like your voice matters. But the best part was the sense of connection. We are all here not just to write code, but to build something meaningful together. Karen: Seeing and getting to catch up some with Django community folk that I only get to see maybe once or twice a year at DjangoCon events. Tobias: For me, DjangoCon 2024 was my first US-based conference since … -
HTTPS for Django Development Environment
Certain modern website features require HTTPS, including Progressive Web Apps (PWA), WebSockets, camera and microphone usage, and geolocation detection. However, the default Django runserver command can only run the web server under HTTP. Is it possible to have HTTPS in your local development environment? Surely, and in this article, I will guide you through how to set it up. How TLS/SSL certificates work First of all, let's have a common ground on how the HTTPS work. HTTPS is what makes websites secure, protecting transferred visitors' data (like passwords or credit card info). TLS (Transport Layer Security), which replaced SSL (Secure Sockets Layer), is the security tool that works behind the scenes to create the safe connection between a client (like a browser) and a server by encrypting the data exchanged. They work using a public key (shared via the certificate) and a private key (kept secret by the server) to establish encrypted connections. These keys are often stored in BASE64-encoded files with extensions like .pem. A Certificate Authority (CA) is a trusted organization or entity responsible for issuing and managing digital certificates used in TLS/SSL encryption. Trusted Certificate Authorities verify the identity of website owners and sign their certificates to … -
Django News - Django 6.x Steering Council Candidates - Dec 13th 2024
News Django 6.x Steering Council Candidates There are 12 individuals who have chosen to stand for election and written statements of intent. Existing individual members are eligible to vote. Voting is open until 23:59 on December 17, 2024 Anywhere on Earth. djangoproject.com PSF Fellow Membership: Welcome 2024 Q3 Fellow Members! Congratulations to fellow Djangonauts Jay Miller, Kojo Idrissa, and Trey Hunner, who are now Python Fellows. python.org Django Software Foundation DSF Board monthly meeting, December 10, 2024 Meeting minutes for DSF Board monthly meeting, December 10, 2024. djangoproject.com My first DSF board meeting New DSF Board Member Paolo Melchiorre describes his first meeting and a behind-the-scenes peak at how Django is actually run. paulox.net Updates to Django Today 'Updates to Django' is presented by Velda Kiara from Djangonaut Space! Last week we had 20 pull requests merged into Django by 15 different contributors - including 3 first-time contributors! Congratulations to Oleg Sverdlov, Ülgen Sarıkavak, and Joel Burns for having their first commits merged into Django - welcome on board! The following security issues have been addressed: Potential denial-of-service in django.utils.html.strip_tags() Potential SQL injection in HasKey(lhs, rhs) on Oracle The affected versions are: Django main, Django 5.1, Django 5.0 and Django … -
1Password and DigitalOcean Droplet - Building SaaS #208
In this episode, I continued a migration of my JourneyInbox app from Heroku to DigitalOcean. We configured the secrets using 1Password and created the droplet that will host the app. -
UV and Ruff: Next-gen Python Tooling
Dive into the dynamic duo of modern Python development – UV and Ruff! -
pretix - Raphael Michel
pretix and on GitHubrami.ioDjangoCon Europe 2023 | Building and scaling a live event platform with django-channelsDjangoCon Europe 2024 | Fast on my machine: How to debug slow requests in productionBuilding a business on open-source applicationsDjangoCon Europe 2020 | Security strategies for multi-tenant applicationsDjangoCon Europe 2019 | Plugin architectures for Python web applicationsDjangoCon Europe 2017 | Data internationalization in DjangoDjangoCon Europe Organizers Support Working GroupAnnouncing DjangoCon Europe 2025 in DublinSponsorsThe Stack Report - Carlton's Monthly Premium NewsletterLearnDjango.com - Free Tutorials and Premium Courses -
My first DSF board meeting
Thoughts and insights aboutr my first meeting as a Django Software Foundation board member. -
Thinking About Risk: Mitigation
So you’ve identified a risk — now what do you do about it? Here’s a simple framework to help frame discussions about risk mitigation. It’s intentionally very simple, a basic starting point. I’ll present a more complex framework later in this series, but I want to lay more of a foundation before I get there, so we’ll start here. -
Weeknotes (2024 week 49)
Weeknotes (2024 week 49) Django Steering Council elections I have been thinking long and hard about running for the Django Steering Council. I think there are a few things I could contribute since I’ve been using Django for 16 or more years, and have been working on, maintaining and publishing third-party apps almost all this time. I have also contributed a few small features to Django core itself, and contributed my fair share of tests and bugfixes. The reason why I haven’t been more involved was always that I feared the review process with what I perceive to be a too unrestrained perfectionism. Teaching people is good, but I fear that those who teach are self-selected survivors of the process, which come to appreciate the perfectionism a bit too much. It’s somewhat the same as with the Swiss naturalization process – the hurdles are very high, and some of those who weather the process maybe are or grow to be too fond of it. An important point is that this has nothing to do with being nice (or not). Everybody has always been great, maybe with the exception of myself back when I didn’t understand that the problem wasn’t the … -
Django News - Django security releases issued: 5.1.4, 5.0.10, and 4.2.17 - Dec 6th 2024
News Django security releases issued: 5.1.4, 5.0.10, and 4.2.17 Django 5.1.4 fixes one security issue with severity “high”, one security issue with severity “moderate”, and several bugs in 5.1.3. djangoproject.com Python 3.13.1, 3.12.8, 3.11.11, 3.10.16 and 3.9.21 are now available Another big release day! Python 3.13.1 and 3.12.8 were regularly scheduled releases, but they do contain a few security fixes. That makes it a nice time to release the security-fix-only versions too, so everything is as secure as we can make it. blogspot.com A new home for python-build-standalone Astral is taking stewardship of python-build-standalone, Gregory Szorc's foundational project for installing portable Python distributions. astral.sh Django Software Foundation Help us make it happen ❤️ And just like that, 2024 is almost over! If your finances allow, donate to the Django Software Foundation to support the long-term future of Django. djangoproject.com Updates to Django Add support for multi-column primary keys A 19-year-old ticket just got accepted! djangoproject.com Today 'Updates to Django' is presented by Velda Kiara from Djangonaut Space! Last week we had 20 pull requests merged into Django by 15 different contributors - including 3 first-time contributors! Congratulations to Tommy Allen, Ayush Khatri , and Brock Smickley for having their first … -
Finding Blocks Across a Wagtail Site
Discover how to efficiently locate and update specific blocks across your Wagtail site, even when they're deeply nested. -
Django: launch pdb when a given SQL query runs
Here’s another technique for using pdb within Django. I will add this to the new debugging chapter of Boost Your Django DX in a future update. When debugging Django code, you might need to start with a given SQL query and work backwards to find the code that triggered it. This can be surprisingly hard because the ORM doesn’t neatly map to SQL, and the laziness of QuerySets means queries can run far from where they were created. One way to go from a query to the triggering code is to use database instrumentation. This allows you to write middleware-like functions for SQL queries. In this case, we’ll use that capability to detect when specific queries run and open the debugger. (I’ve blogged about database instrumentation before, on backporting a Django ORM feature and always-installed instrumentation.) Below is a context manager that temporarily installs a database instrumentation function. That function opens the debugger with breakpoint() for any query that looks like a SELECT on the example_book table. from contextlib import contextmanager from django.db import connection @contextmanager def breakpoint_on_target_query(): def instrument(execute, sql, params, many, context): if sql.startswith("SELECT") and 'FROM "example_book"' in sql: breakpoint() return execute(sql, params, many, context) with connection.execute_wrapper(instrument): yield … -
Rebuilding django-prose-editor from the ground up
Rebuilding django-prose-editor from the ground up The django-prose-editor package provides a HTML editor based upon the ProseMirror toolkit for the Django administration interface and for the frontend. The package has been extracted from a customer project and open sourced so that it could be used in other projects as well. It followed a very restricted view of how rich text editors should work, which I have initially added to the FeinCMS repository when documenting the design decisions more than 15 years ago (Note that I didn’t edit the paragraph, it’s reproduced here as it was back then, with all the errors and heedlessness.) All of this convinced me that offering the user a rich text editor with too much capabilites is a really bad idea. The rich text editor in FeinCMS only has bold, italic, bullets, link and headlines activated (and the HTML code button, because that’s sort of inevitable – sometimes the rich text editor messes up and you cannot fix it other than going directly into the HTML code. Plus, if someone really knows what he’s doing, I’d still like to give him the power to shot his own foot). My personal views are unchanged. I have to … -
Making Django Ready for the Next 20 Years
Emma Delescolle's candidacy statement for the Django Steering Council. Making Django ready for the next 20 years by: - lowering the barrier to contribution and involving a more diverse set of contributors - dealing with the realities of an aging code-base - building code ownership and groups specializing in specific areas of core - enacting feature requests from the steering council (django roadmap) - improving the third-party package story Read more in the article! -
Thinking About Risk: An introduction to thinking about risk
Welcome to a new series about how to think about risk. This series is a crash course, a high-level introduction to the most important concepts and risk frameworks. It’s intended for people who encounter risk from time to time and need some basic tools, but don’t want to make a deep study of it. My hope is that it’ll help you better analyze risk when it comes up for you, and also make it easier to navigate conversations with risk professionals. -
Django News - 2024 Malcolm Tredinnick Memorial Prize awarded to Rachell Calhoun - Nov 29th 2024
News 2024 Malcolm Tredinnick Memorial Prize awarded to Rachell Calhoun This year's winner is Rachell Calhoun. Read more about her contributions to Django along with those of her follow nominees. djangoproject.com Django 6.x Steering Council Candidate Registration Registration is open for candidates until December 4, 2024. djangoproject.com 🏷️ Python Black Friday & Cyber Monday sales (2024) The seventh annual compilation of Python learning deals compiled by Trey Hunner. treyhunner.com Django Software Foundation Django Developers Survey 2024 The annual Django Developers Survey is now live! It should take you about 10 minutes to complete and provides a wealth of information to the Django team and community on how Django is actually being used. jetbrains.com DjangoCon Europe 2026 call for organizers completed The DjangoCon Europe 2026 call for organizers is now over. We’re elated to report we received three viable proposals, a clear improvement over recent years. djangoproject.com Updates to Django Today's 'Updates to Django' is presented by Abigail Afi Gbadago from Djangonaut Space! Last week we had 10 pull requests merged into Django by 9 different contributors - including a first-time contributor! Congratulations to Caitlin Hogan for having their first commit merged into Django - welcome on board! 🚀 New in … -
Django: launch pdb in templates with a custom {% breakpoint %} tag
In my recent Boost Your Django DX update, I added a new chapter on debuggers. Here’s an extra technique I didn’t finish in time for the update, but I will include it in the next one. Django templates can be hard to debug, especially to figure out which variables are available after several levels of {% extends %} or {% include %} tags. The template engine doesn’t provide a built-in way tag to open the debugger, but adding one is not much work. Below is a custom template tag that starts debugging with breakpoint(). Find this file in resources.zip as debuggers/party-central/example/templatetags/debugging.py. from django import template register = template.Library() @register.simple_tag(name="breakpoint", takes_context=True) def breakpoint_tag(context): exec("breakpoint()", {}, context.flatten()) The tag uses exec() to populate the debugger’s local variables with all variables from the current context. To set up this tag for convenient use: Copy the file as a template tag library called debugging.py. This should be in an app’s templatetags directory, as described in Django’s custom template tag tutorial. For example, if you have an app called core, copy this code to core/templatetags/debugging.py. Add the debugging library to the builtins option in TEMPLATES: TEMPLATES = [ { "BACKEND": "django.template.backends.django.DjangoTemplates", "DIRS": [BASE_DIR / "example" … -
Python Tooling - Hynek Schlawack
Hynek’s personal websiteVariomediaHynek on YouTube, Mastodon, and GitHubDjangoCon 2008 Keynote by Cal Henderson: Why I Hate Djangoattrs - Python Classes Without Boilerplatesvcs - A Flexible Service Locator for PythonHynek’s 2011 Review, Ticket 6148 and 373Jacob Kaplan-Moss Thread on extending languagesThe End Of Object Inheritance & The Beginning Of A New ModularityThe Rising SeaDjangoTVSubclassing, Composition, Python, and You - TalkSubclassing in Python ReduxSponsorLearnDjango.com - 50% Black Friday Sale! -
Django: fix a view using a debugger with breakpoint()
This post is an adapted extract from my book Boost Your Django DX, available now with a 50% discount for Black Friday 2024. Python’s breakpoint() function opens its debugger, pdb, which pauses the program and allows you to inspect and modify things. Let’s look at an example of using it within a Django view, from a sample project included in Boost Your Django DX. Here’s what the project looks like: This page, “Party Central”, lists animals with their pizza preferences and whether they’re hungry. Underneath the table are two filter buttons, “Hungry” and “Satiated”, which allow you to select only animals with those hunger levels. Unfortunately, the filter buttons are broken. Click “Hungry” to load http://localhost:8000/?hungry=1 and we see the same list of animals: The hungry URL parameter is there, and the button is highlighted, but the data isn’t filtered. Let’s use pdb to figure out why. We can run pdb with the breakpoint() function, a Python built-in that opens the configured debugger (which is pdb by default). Let’s add it to the view function, before it renders the template. Here’s how the views.py file looks: from django.shortcuts import render from example.models import Animal def index(request): animals = Animal.objects.order_by("name") hungry … -
Creating AI-based Summaries in a Django Website
Summarizing lengthy text can be tedious, especially on platforms like PyBazaar, where concise summaries improve user experience. In this post, I'll share how I used Simplemind and Gemini to automate this process in my Django-based project. Background Info Recently, I launched PyBazaar.com, a website for Python developers to show their skills, find job offers, and post and find development resources. Its purpose is to have a central place where Python developers can market their services, products, or projects. PyBazaar shows lengthy descriptions of career opportunities and resources in the detail views and short summaries in the list views. Summaries help users quickly grasp the content of resources and career opportunities without opening each detailed view, enhancing the overall browsing experience on PyBazaar. To make the editing smoother, I introduced automatic summarization based on AI. Choosing Simplemind for Communication with LLMs Kenneth Reitz, the author of the famous package requests, recently published his newest creation—Simplemind—which improves the developer experience with the APIs of large language models (LLMs). I thought it would be a good opportunity to try integrating his package into PyBazaar. While I chose Google Gemini for its free tier, Simplemind's support for providers like OpenAI or Claude means developers … -
Creating AI-based Summaries in a Django Website
Summarizing lengthy text can be tedious, especially on platforms like PyBazaar, where concise summaries improve user experience. In this post, I'll share how I used Simplemind and Gemini to automate this process in my Django-based project. Background Info Recently, I launched PyBazaar.com, a website for Python developers to show their skills, find job offers, and post and find development resources. Its purpose is to have a central place where Python developers can market their services, products, or projects. PyBazaar shows lengthy descriptions of career opportunities and resources in the detail views and short summaries in the list views. Summaries help users quickly grasp the content of resources and career opportunities without opening each detailed view, enhancing the overall browsing experience on PyBazaar. To make the editing smoother, I introduced automatic summarization based on AI. Choosing Simplemind for Communication with LLMs Kenneth Reitz, the author of the famous package requests, recently published his newest creation—Simplemind—which improves the developer experience with the APIs of large language models (LLMs). I thought it would be a good opportunity to try integrating his package into PyBazaar. While I chose Google Gemini for its free tier, Simplemind's support for providers like OpenAI or Claude means developers …