25 Jan 2025
Django community aggregator: Community blog posts
Looking at Django task runners and queues
I use django-apscheduler to run a queue of scheduled tasks. Now I also need the ability to run one-off tasks and that turned out to not be so simple.
25 Jan 2025 5:59am GMT
24 Jan 2025
Django community aggregator: Community blog posts
Django News - Django 5.2 alpha 1 release - Jan 24th 2025
News
Django 5.2 alpha 1 released
Django 5.2 alpha 1 is now available. It represents the first stage in the 5.2 release cycle and is an opportunity for you to try out the changes coming in Django 5.2.
Hello from the new Steering Council; and a quick temporary voting process change
The Steering Council is officially in action, and we want to give you a heads-up on a change we're making for the short term.
Djangonaut Space - New session 2025
Djangonaut Space is holding a fourth session! This session will start on February 17th, 2025. Applications are open until January 29th, 2025, Anywhere on Earth.
Tailwind CSS v4.0 - Tailwind CSS
Tailwind CSS v4.0 is out - an all-new version of the framework optimized for performance and flexibility, with a reimagined configuration and customization experience, and taking full advantage of the latest advancements the web offers.
Django Software Foundation
President of the Django Software Foundation
Notes from the Thibaud Colas, the new President of the Django Software Foundation.
Updates to Django
Today 'Updates to Django' is presented by Velda Kiara from Djangonaut Space!
Last week we had 26 pull requests merged into Django by 10 different contributors - including 1 first-time contributor! Congratulations to Thibaut Decombe for having their first commits merged into Django - welcome on board 🎊!
Big news! Django 5.2a1 is released! Please test the alpha version, try out the new features, and report any regressions on Trac.
The following enhancements were added to Django 5.2 last week:
- Built-in aggregate functions accepting only one argument (
Avg
,Count
, etc.) now raise aTypeError
when called with an incorrect number of arguments. - The ability to override the
BoundField
class for fields, forms, and renderers, providing greater flexibility in form handling.
Django Newsletter
Wagtail CMS
Results of the 2024 Wagtail headless survey
The results of the 2024 Wagtail headless survey are here! There are plenty of expected results plus a few surprises.
Sponsored Link 1
Django & Wagtail Hosting for just $9/month
New year, new site! Finally put those domain names to use and launch that side-project, blog, or personal site in 2025. Lock in this limited time pricing by Feb 28.
Articles
Ideas how to support Tailwind CSS 4.x in django-tailwind-cli
A look at potential updates to align with Tailwind's new CSS-first configuration, simplified theme setup, and other breaking changes, while weighing user-friendly migration strategies versus manual transitions.
Monkeypatching Django
A deep dive into how the nanodjango project leverages monkeypatching and metaclass manipulation to enable full Django functionality within a single-file application, bridging the gap between lightweight prototypes and Django's powerful features.
Django Islands: Part 1 - Side Quests by Bo Lopker
On using SolidJS with Django to build a type-safe frontend that the whole team will love.
Show Django forms inside a modal using HTMX
Learn how to create and edit models using Django forms inside a modal using HTMX
Exploring Python Requirements
A guide to using the uv tool for managing Python project dependencies, showcasing features like tree views, listing outdated packages, and integrating interactive package selection with tools like wheat to streamline dependency updates.
Django admin tip: Adding links to related objects in change forms
This article explores two practical methods for enhancing the Django admin interface by linking related objects directly in change forms, improving navigation and usability.
Django Developer Salary Report 2025
An annual report from Foxley Talent on Django developer salaries.
urllib3 in 2024
Highlights from 2024 for the urllib3 team in terms of funding, features, and looking forward.
Tutorials
The definitive guide to using Django with SQLite in production
A comprehensive look at using SQLite for Django projects under real-world traffic, detailing its benefits and potential challenges and deployment strategies.
Sponsored Link 2
Buff your Monolith
Scout Monitoring delivers performance metrics, detailed traces and query stats for all your app routes with a five-minute setup. Add our Log Management and have everything you need to make your Django app shiny and fast. Get started for free at https://try.scoutapm.com/djangonews
Podcasts
Django Chat #174: Beyond Golden Pathways - Teaching Django with Sheena O'Connell
Sheena is a long-time Django developer and teacher currently focused on Prelude Tech, small workshops focused on topics like Django, HTMX, and Git.
Django News Jobs
Senior Backend Engineer at BactoBio 🆕
Senior Software Engineer at Spark
Front-end developer at cassandra.app
Lead Django Developer at cassandra.app
Développeur(se) back-end en CDI at Brief Media
Django Newsletter
Django Forum
Call for Project Ideas and Prospective Mentors for GSoC 2025
Google Summer of Code (GSoC) rolls around again. Historically this has been a real boon for Django, with successes again this year. We need project ideas and prospective mentors for 2025. Do you have one? Is that you?
Projects
Salaah01/django-action-triggers
A Django library for asynchronously triggering actions in response to database changes. It supports integration with webhooks, message brokers (e.g., Kafka, RabbitMQ), and can trigger other processes, including AWS Lambda functions.
OmenApps/django-templated-email-md
An extension for django-templated-email for creating emails with Markdown.
This RSS feed is published on https://django-news.com/. You can also subscribe via email.
24 Jan 2025 5:00pm GMT
23 Jan 2025
Django community aggregator: Community blog posts
Strip spaces
When I joined TriOptima back in 2010, a common pattern emerged where names of things were slightly off because of stray whitespaces. Sometimes we had duplicates like "foo"
, "foo "
and " foo"
in the database. Sometimes we couldn't find stuff in logs because you searched for "foo was deleted"
, when actually you had to search for "foo was deleted"
(notice the double space!). Sorting was "broken" because " foo"
and "foobar"
are not next to each other. And more issues that I can't remember…
It was everywhere, causing problems across the entire code base. Each individual issue was easily fixed by cleaning up the data, but it added up to an annoying support burden. My fix at the time was to make a function that took a Django Form
instance and returned a new instance with space stripping on all fields. Something like:
form = auto_strip(Form(...))
After I added that to every single Django form in the entire code base that slow and steady trickle of bugs and annoyances just stopped. From seeing a few a month consistently to zero for the next ~9 years. Even better: I never got a complaint about it.
This was fixed in Django 1.9 after some fierce debating back and forth ("will never happen" was uttered). In iommi forms we've had this since the beginning, which turns out to be a few months ahead of when Django took this decision (although it was tri.form and not iommi back then).
Just when you think you're out
Unfortunately the story doesn't end here. I started getting this issue again, and it took me a while to realize it's because of SPA-like pages that uses Pydantic serializers instead of a form library. To solve this I added this base class for my schemas:
class Schema(ninja.Schema):
@validator('*')
def strip_spaces(cls, v: Any) -> Any:
if isinstance(v, str) and '\n' not in v:
return v.strip(' ')
return v
The reason I'm not stripping spaces if the text contains a newline is to avoid situations where you have multiline text fields with indented code. Maybe it's just programmers who will care, but we tend to care a lot :P
Modifying data silently and by default like this sounds like a bad idea and I also get a little pit in my stomach when I think about it with that frame of mind, but this specific case seems like all win and no downside from my 14 years of experience doing it.
23 Jan 2025 6:00am GMT