01 May 2026
Django community aggregator: Community blog posts
Redesigning DjangoProject.com
News
PyCharm Campaign Now Includes RENEWALS!
Past or current PyCharm Pro users can now take part in the PyCharm campaign! Add 12 months to your current PyCharm Pro subscription. The same deal applies to past, current, or first time users. Get PyCharm Pro 30% off and 100% goes directly to the DSF! Until May 3rd.
Adopt Annual Release Cycle (DEP 20)
A new DEP from Carlton Gibson proposing that Django move to an annual release cycle. There is a lengthy discussion on the GitHub ticket
What's new in pip 26.1 - lockfiles and dependency cooldowns!
A detailed post of new features from Richard Si, the current maintainer, including pylock files, dependency cooldowns, security fixes, and more.
Django Software Foundation
It's time to redesign djangoproject.com
A redesign of the djangoproject.com website is in progress. This post from the Django blog is an update on the project's process: the plan, who's doing the work, and how you can help.
Updates to Django
Today, "Updates to Django" is presented by Hwayoung from Djangonaut Space! ๐
Last week we had 14 pull requests merged into Django by 13 different contributors - including a first-time contributor! Congratulations to Dinesh Thumma for having their first commits merged into Django - welcome on board!
All release note-related changes this week came from Djangonaut Space. ๐
- Added
ModelAdmin.delete_confirmation_max_displayoption to truncate the list of related objects on the delete confirmation page indjango/contrib/admin/options.py, added in Django 6.1 (#10109). - Fixed the inaccessible "---------" blank choice label in form
<select>controls by replacing it with "- Select an option -" via a newBLANK_CHOICE_LABELsetting indjango/conf/global_settings.py, added in Django 6.1, and deprecatedBLANK_CHOICE_DASH(#35879).
Sponsored Link
Articles
Running from Django's main development branch in production
Carlton Gibson makes the case for running Django off of Django's main development branch rather than waiting for security and feature releases.
Before GitHub
Armin Ronacher, of Flask and other open-source Python fame, looks wistfully at GitHub's decline and points out that Open Source did not always work this way.
Leaving GitHub as a Social Network
David Guillot points out the many red lines that Microsoft has recently crossed and debates other alternatives.
pgBackRest is dead. Now what?
One of several posts on the longtime sole maintainer of pgBackRest stepping away. This is a fundamental tool for PostgreSQL and a general failure in the open source ecosystem. Additional posts by Jan, Christophe, Stefanie, and Jay.
Django Fellows Update
Fellow Report - Natalia
Another busy week triaging six tickets, reviewing six more, security reports, meetings, and discussions around the recent DEP 20.
Fellow Report - Sarah
Finished up Navigator duties for Djangonauts, managed tickets and security work, and weighing in on anew-features suggestion for Django Admin actions configurable as buttons.
Fellow Report - Jacob
A four day week after returning from DjangoCon yielded some wins like merging @annalauraw's work on improved blank choice labels in forms and @rodbv's work on truncating huge deletion confirmation pages in the admin.
Podcasts
Django Chat #201: DjangoCon Europe Recap + Other News - Jeff Triplett
Jeff is President of the Django Software Foundation and a partner at REVSYS. We discuss the recently held DjangoCon Europe conference, existing Django news, and then share notes on current AI-powered workflows. Also available in video format on YouTube.
Events
DjangoCon US Sponsorship Opportunities
DjangoCon US is August 24-28 this year in Chicago. There are still sponsorship opportunities available (hint, hint) for any companies that want to participate.
EuroPython 2026 tickets now available
This year's conference is in Krakow, Poland from July 13-19, covering two days of tutorials, three days of talks, and two days of sprints.
Django Day Copenhagen Tickets Available
This event is October 2nd and early bird tickets are now available. Note that the event can sell out due to the size of the venue.
PyCon US 2026 - How to Convince Your Boss
PyCon US is fast approaching. If you and your colleagues want to attend, we have a short template to help you discuss the conference at work.
Django London Meetup
Two talks at this event May 7th at Kraken Tech: a talk by Paolo Melchiorre on Django's GeneratedField and Django in the Lab by Andy Woods.
Projects
jsheffie/django-schematic
An interactive graph of your Django model structure. With related blog post.
The Fixi Project
From the creator of HTMX, a collection of five small web libraries based on other libraries they work on. See the related website for more information.
01 May 2026 3:00pm GMT
Issue 335: Redesigning DjangoProject.com
News
PyCharm Campaign Now Includes RENEWALS!
Past or current PyCharm Pro users can now take part in the PyCharm campaign! Add 12 months to your current PyCharm Pro subscription. The same deal applies to past, current, or first time users. Get PyCharm Pro 30% off and 100% goes directly to the DSF! Until May 3rd.
Adopt Annual Release Cycle (DEP 20)
A new DEP from Carlton Gibson proposing that Django move to an annual release cycle. There is a lengthy discussion on the GitHub ticket
What's new in pip 26.1 - lockfiles and dependency cooldowns!
A detailed post of new features from Richard Si, the current maintainer, including pylock files, dependency cooldowns, security fixes, and more.
Django Software Foundation
It's time to redesign djangoproject.com
A redesign of the djangoproject.com website is in progress. This post from the Django blog is an update on the project's process: the plan, who's doing the work, and how you can help.
Updates to Django
Today, "Updates to Django" is presented by Hwayoung from Djangonaut Space! ๐
Last week we had 14 pull requests merged into Django by 13 different contributors - including a first-time contributor! Congratulations to Dinesh Thumma for having their first commits merged into Django - welcome on board!
All release note-related changes this week came from Djangonaut Space. ๐
- Added
ModelAdmin.delete_confirmation_max_displayoption to truncate the list of related objects on the delete confirmation page indjango/contrib/admin/options.py, added in Django 6.1 (#10109). - Fixed the inaccessible "---------" blank choice label in form
<select>controls by replacing it with "- Select an option -" via a newBLANK_CHOICE_LABELsetting indjango/conf/global_settings.py, added in Django 6.1, and deprecatedBLANK_CHOICE_DASH(#35879).
Sponsored Link
Articles
Running from Django's main development branch in production
Carlton Gibson makes the case for running Django off of Django's main development branch rather than waiting for security and feature releases.
Before GitHub
Armin Ronacher, of Flask and other open-source Python fame, looks wistfully at GitHub's decline and points out that Open Source did not always work this way.
Leaving GitHub as a Social Network
David Guillot points out the many red lines that Microsoft has recently crossed and debates other alternatives.
pgBackRest is dead. Now what?
One of several posts on the longtime sole maintainer of pgBackRest stepping away. This is a fundamental tool for PostgreSQL and a general failure in the open source ecosystem. Additional posts by Jan, Christophe, Stefanie, and Jay.
Django Fellows Update
Fellow Report - Natalia
Another busy week triaging six tickets, reviewing six more, security reports, meetings, and discussions around the recent DEP 20.
Fellow Report - Sarah
Finished up Navigator duties for Djangonauts, managed tickets and security work, and weighing in on anew-features suggestion for Django Admin actions configurable as buttons.
Fellow Report - Jacob
A four day week after returning from DjangoCon yielded some wins like merging @annalauraw's work on improved blank choice labels in forms and @rodbv's work on truncating huge deletion confirmation pages in the admin.
Podcasts
Django Chat #201: DjangoCon Europe Recap + Other News - Jeff Triplett
Jeff is President of the Django Software Foundation and a partner at REVSYS. We discuss the recently held DjangoCon Europe conference, existing Django news, and then share notes on current AI-powered workflows. Also available in video format on YouTube.
Events
DjangoCon US Sponsorship Opportunities
DjangoCon US is August 24-28 this year in Chicago. There are still sponsorship opportunities available (hint, hint) for any companies that want to participate.
EuroPython 2026 tickets now available
This year's conference is in Krakow, Poland from July 13-19, covering two days of tutorials, three days of talks, and two days of sprints.
Django Day Copenhagen Tickets Available
This event is October 2nd and early bird tickets are now available. Note that the event can sell out due to the size of the venue.
PyCon US 2026 - How to Convince Your Boss
PyCon US is fast approaching. If you and your colleagues want to attend, we have a short template to help you discuss the conference at work.
Django London Meetup
Two talks at this event May 7th at Kraken Tech: a talk by Paolo Melchiorre on Django's GeneratedField and Django in the Lab by Andy Woods.
Projects
jsheffie/django-schematic
An interactive graph of your Django model structure. With related blog post.
The Fixi Project
From the creator of HTMX, a collection of five small web libraries based on other libraries they work on. See the related website for more information.
01 May 2026 3:00pm GMT
Work & Life updates
This week is a short detour from the normal technical topics I cover around Django, so feel free to skip if this isn't your thing!
Two big items this week, first up is that we launched Hamilton Rock this week! The next few months we will doing a private beta with select customers to test the system is working and get feeback about what's missing and needs more work. This is essential to us get some funding and finding where we are in product market fit!
Next up is that I will be mentoring Praful Gulani through Google Summer of Code this year on adding Experimental APIs to Django. I'm excited and nervous about this as it could have a fairly large impact on Django's trajectory, assuming we crack it and get the shape of this process and API correct. I am also hopeful to secure a new client in the next couple weeks which will address my immediate cashflow issues in the business.
In other news I'm working on a number of side projects. First up is Django Bureau and allpacked.co.uk. This is an experiment in getting AI agents to run an e-commerce store in an autonomous manner without much of my input, or at least that's the immediate goal. This will also have the side benefit of giving me greater understanding of our customers for Hamilton Rock.
Comfort Monitor Live has some updates coming in the pipeline which have developed much quicker thanks to Claude Code. Again with Claude I hope to do some concrete marketing in the near future, which will hopefully result in some revenue.
After the conversations and talk and DjangoCon Europe I have some renewed energy to put into django-prodserver, mainly around improving the API and shifting the development forward to a stable state.
Finally I have also forked a project from my church which is a Django backend for a virtual prayer/praise wall. I'm developing it into a more generic project that could suit more online communities, adding a few new feature ideas I have and perhaps exploring the idea of it being federated.
I do have other projects in the works, but they are lower down the list of priorites so the above need to get to a satisfactory place before I move on... or at least that's the idea, I was getting overwhelmed with the number of ideas/projects in my head so hopefully this is more managable!
I'm also wanting to blog about my adventures with neapolitan and pushing Django templates in new ways (again this required time I don't have much of!)
01 May 2026 5:00am GMT
29 Apr 2026
Django community aggregator: Community blog posts
DjangoCon Europe Recap + Other News - Jeff Triplett
๐ Links
- 30% off PyCharm, 100% to Django promo
- REVSYS website
- Django News Newsletter new website
- Adopt Annual Release Cycle (DEP 20)
- Django on the Med - September 23rd to 25th in Pescara, Italy
- DSF Board Member Minutes Website
- Air: Agentic Development Environment
๐ฆ Projects
๐ Books
- The Worlds I See by Fei-Fei Li
- The Greatest Bedtime Story Ever by Jessie Sima and Enshittification by Cory Doctorow
๐ฅ YouTube
๐ค Sponsor
This episode is brought to you by Six Feet Up, the Python, Django, and AI experts who solve hard software problems. Whether it's scaling an application, deriving insights from data, or getting results from AI, Six Feet Up helps you move forward faster.
See what's possible at https://sixfeetup.com/.
29 Apr 2026 2:00pm GMT
27 Apr 2026
Django community aggregator: Community blog posts
Easily Stream LLM Responses with Django-Bolt and PydanticAI
I like how easy it is to create an async streaming endpoint with django-bolt and PydanticAI from scratch. With only a few commands you can set it up.
27 Apr 2026 6:00pm GMT
My DjangoCon Europeย 2026
A timeline of my DjangoCon Europe 2026 journey, from Lecce to Bari and then Athens, told through the Mastodon posts I shared along the way.
27 Apr 2026 3:00am GMT
24 Apr 2026
Django community aggregator: Community blog posts
Issue 334: New look, new home, same everything else
News
uv is now supported natively - Read the Docs
Read the Docs now natively supports uv, bringing faster and simpler Python dependency installs to your docs builds.
Support the Django Software Foundation by buying PyCharm at a 30% Discount
JetBrains and the Django Software Foundation team up again to offer 30% off PyCharm while matching donations to fund Django's core development and community programs.
Django Software Foundation
DSF member of the month - Rob Hudson
Rob Hudson, creator of Django Debug Toolbar, reflects on his open source journey, Django's community spirit, and bringing Content Security Policy support into Django core.
Python Software Foundation
Announcing Python Software Foundation Fellow Members for Q1 2026! ๐
The Python Software Foundation has announced its first 2026 class of Fellows, recognizing community leaders and contributors from around the world.
Wagtail CMS News
Save the ๐ : Delete your Stuff!
For Earth Day, Wagtail makes the case that deleting old emails, files, and forgotten drafts is a simple way to cut digital clutter and lighten your carbon footprint.
Updates to Django
Today, "Updates to Django" is presented by Raffaella from Djangonaut Space! ๐
Last week we had 26 pull requests, into Django by 13 different contributors - including a first-time contributor! Congratulations to Gary Badwal for having their first commits merged into Django - welcome on board!
A huge congratulations on the work done at DjangoCon Europe 2026's sprint, because 4 of those PRs were merged during the sprints ๐ฐ
News in Django:
- The undocumented function
django.template.library.parse_bits()no longer accepts thetakes_contextargument, while theInclusionAdminNode.__init__()now takes the template tagnameas the first positional argument. - Fixed a misplaced
` in thedjango/contrib/admin/templates/admin/change_list.htmltemplate added in Django 6.0 that could be problematic when overriding thepagination` block (#37029). - The new
BitAnd,BitOr, andBitXoraggregates return the bitwiseAND,OR,XOR, respectively. These aggregates were previously included only incontrib.postgres. - The
Fileclass now always evaluates toTruein boolean contexts, rather than relying on thenameattribute. The built-in subclassesFieldFile,UploadedFile,TemporaryUploadedFile,InMemoryUploadedFile, andSimpleUploadedFileretain the previous behavior of evaluating based on thenameattribute.
Sponsored Link
You know @login_required. Now meet @app.reasoner(). AgentField turns Python functions into production AI agents, structured output, async execution, agent discovery. Every decorator becomes a REST endpoint. Open source, Apache 2.0. Python, Go & TypeScript SDKs.

Articles
DjangoCon Europe 2026 - A Brief Report
A DjangoCon Europe talk explores using transpiled Django templates in the browser to power dynamic forms without constant server requests.
How to Safely Update Your Dependencies
A practical guide to safer dependency updates, covering hashes, GitHub Action pinning, cooldown windows, and automated upgrades to reduce supply chain risk.
Django: fixing a memory "leak" from Python 3.14's incremental garbage collection
Adam Johnson explains how a Django migration memory "leak" on Python led to a clever workaround and helped expose issues with its new garbage collector.
PDM Rocks!| stuartm.nz
PDM is winning over Django developers with an easy switch from uv, smarter dependency controls, and a polished project workflow.
DjangoCon Europe 2026 Review
A first-time speaker's perspective on DjangoCon Europe 2026 in Athens, packed with standout talks, community energy, and inspiration for the year ahead.
Djangocon Europe: Django templates on the frontend? - Christophe Henry
A DjangoCon Europe talk explores using transpiled Django templates in the browser to power dynamic forms without constant server requests.
Events
Django on the Med is back!
Django on the Med returns this September with three free days of focused Django sprints in beautiful Pescara, with registration now open.
PyBeach 2026
PyBeach returns on October 24, 2026 in Santa Monica, with tickets on sale now and its call for speakers open through June 7.
Django Job Board
Django Job Board
Junior Software Developer (Apprentice) at UCS Assist ๐
Technical Lead at UCS Assist ๐
Web Developer at Crossway ๐
PyPI Sustainability Engineer at Python Software Foundation ๐
Projects
wemake-services/django-modern-rest
Modern REST framework for Django with types and async support!
24 Apr 2026 3:00pm GMT
23 Apr 2026
Django community aggregator: Community blog posts
DjangoCon 2026 Review
This week I have just got back from my third DjangoCon Europe. This year was Athens and once again it was an amazing experience. Made slightly stressful this time by doing a last minute talk that I had proposed but got rejected, it was a last minute cancellation that meant I got the opportunity to do so! So I spent most of the conference preparing for that in terms of slides, demo and practising. I also managed to squeeze in a lightning talk on Thursday for the online community working group to advertise it and call out that we can and should do better online as a community, there's more to do and we need help!
The main talk I did was on however essentially advertising Django prodserver, the package I've created, but framing it as an API design talk, so Django lacks a deployment API story, or running and I was focusing on running Django projects. So we lack a production story and the run server argument is that it's it doesn't really communicate actually what it's the commands doing. So I think it generated a bit of interest. Some peop I think it, lots of people appreciated it, I think, or enjoyed it.
I thoroughly enjoyed the other talks as well. There were some excellent database talks from Tim Bell at Kraken, Jake Howard from Torchbox, more folks at Kraken, Charlie and Sam talking about subatomic. A really an excellent set of talks overall this year, I could go through each one, but each I attended I either learnt something new or have a new package to experiment with later this year. Finally the keynotes are worth a mention, I caught most of Daniele's on philisophy and documentation and Carlson's was excellent to kick us off on types and his new package django-mantle. I I was very sad that I missed the sprints this year but had to get back for family commitments at the weekend which made for a fun trip home!
Finally the socials were great! My slight bias for Tuesday with a pre-conference Django social, the afterparty on Thursday was smooth with a visit to Django Gelato afterwards - would 100% recommend ffor any visit to Athens. The venue was excellent and allowed for multiple opportunities for networking with lots of folks at different times. I'm excited for already excited for 2027 where I think I might volunteer and maybe propose a talk again, but that entire depends on what happens in the next 6 months! Or perhaps next year I may be giving the US conference a go. In the meantime I'm hoping to attend Django on the Med (and/or perhaps a Django off the Med!)
23 Apr 2026 5:00am GMT
20 Apr 2026
Django community aggregator: Community blog posts
Django: fixing a memory โleakโ from Python 3.14โs incremental garbage collection
Back in February, I encountered an out-of-memory error while migrating a client project to Python 3.14. The issue occurred when running Django's database migration command (migrate) on a limited-resource server, and seemed to be caused by the new incremental garbage collection algorithm in Python 3.14.
At the time, I wrote a workaround and started on this blog post, but other tasks took priority and I never got around to finishing it. But four days ago, Hugo van Kemenade, the Python 3.14 release manager, announced that the new garbage collection algorithm will be reverted in Python 3.14.5, and the next Python 3.15 alpha release, due to reports of increased memory usage.
Here's the story of my workaround, as extra evidence that reverting incremental garbage collection is a good call.
Python 3.14's incremental garbage collection
Python (well, CPython) has a garbage collector that runs regularly to clean up unreferenced objects. Most objects are cleaned up immediately when their reference count drops to zero, but some objects can be part of reference cycles, where some set of objects reference each other and thus never reach a reference count of zero. The garbage collector sweeps through all objects to find and clean up these cycles.
Python 3.14 changed garbage collection to operate incrementally. Previously, a garbage collection run would sweep through all objects in one go, but this could lead to "stop the world" stalls where your program's real work could pause for seconds while the garbage collector did its job. The incremental garbage collection algorithm instead does a fraction of the work at a time, spreading out the cost of garbage collection.
Here's the full release note (historical source):
Incremental garbage collection
The cycle garbage collector is now incremental. This means that maximum pause times are reduced by an order of magnitude or more for larger heaps.
There are now only two generations: young and old. When
gc.collect()is not called directly, the GC is invoked a little less frequently. When invoked, it collects the young generation and an increment of the old generation, instead of collecting one or more generations.The behavior of
gc.collect()changes slightly:
gc.collect(1): Performs an increment of garbage collection, rather than collecting generation 1.- Other calls to
gc.collect()are unchanged.(Contributed by Mark Shannon in 108362.)
The problem
I'd been helping one of my clients upgrade to Python 3.14 for a few months, chipping away at compatibility work like upgrading dependencies and fixing deprecations. Tests were finally all passing and everything was working on the local development server. The next stop was to launch a temporary deployment using Python 3.14 via Heroku's review apps feature.
At the basic tier, Heroku review apps use fairly resource-constrained servers, including just 512MB of RAM, with the ability to temporarily burst up to nearly 1GB (200%). Paying for larger servers is an option, but unfortunately the next step up is pretty expensive.
When I launched a review app for my Python 3.14 branch, I found its release phase failed while running migrate. Inspecting the logs, I found the migrations started fine:
$ heroku logs --app example-python-314-wsgk3w --num 1000 | less
...
app[release.6634]: System check identified no issues (26 silenced).
app[release.6634]: Operations to perform:
app[release.6634]: Apply all migrations: admin, auth, contenttypes, ...
app[release.6634]: Running migrations:
โฆbut partway through, these messages started appearing:
heroku[release.6634]: Process running mem=527M(101.5%)
heroku[release.6634]: Error R14 (Memory quota exceeded)
โฆramping up until the 200% mark:
heroku[release.9599]: Process running mem=977M(190.3%)
heroku[release.9599]: Error R14 (Memory quota exceeded)
โฆand finally the termination of the release process:
heroku[release.9599]: Process running mem=1033M(201.7%)
heroku[release.9599]: Error R15 (Memory quota vastly exceeded)
heroku[release.9599]: Stopping process with SIGKILL
These messages came from Heroku's process management layer, which terminated the memory-hungry release process with SIGKILL after the hard threshold of 1GB memory usage was breached. Repeat attempts hit the same issue.
I was confused: migrations should not consume much memory. While they create a lot of temporary objects (Django model classes and fields) in order to calculate the SQL to send to the database, such objects are all short-lived and should be garbage-collected fairly swiftly. Additionally, migrations worked fine on the local and CI environments, and they'd never had memory issues on previous Python versions.
It looked like there was a memory leak, and it was time to dig in.
Initial investigation
I first profiled memory usage of migrate locally using Memray, the memory profiler that I covered in my previous post, using:
$ memray run manage.py migrate
The profiles revealed that memory usage had slightly increased on Python 3.14 compared to 3.13, but did not find a memory leak (a pattern of continual growth). Still, I made some optimizations to defer some imports, saving about 30% of startup memory usage, and tried again, to no avail.
I then had the idea to profile on a Heroku dyno directly. After hacking the release process to not run migrations, I built a review app and SSH'd into its web server:
$ heroku ps:exec -a example-python-314-rspwtc --dyno web.1 bash
Establishing credentials... done
Connecting to web.1 on โฌข example-python-314-rspwtc...
~ $
Initially, I tried using Memray's live mode to profile the migrations as they ran:
$ memray run --live manage.py migrate
While this tool looks great for some situations, it didn't really work here, especially since it seized up after Heroku terminated the server.
I then tried running the default memray run command:
$ memray run manage.py migrate
Writing profile results into memray-manage.py.724.bin
โฆthen, on my local computer, I repeatedly ran this command to copy down the results file:
$ trash memray-manage.py.724.bin && heroku ps:copy -a example-python-314-rspwtc --dyno web.1 memray-manage.py.724.bin
I was a bit worried here that the Memray binary file might be corrupted due to copying it while memray run was generating it. But with a final truncated copy left over after the server crashed, I asked Memray to generate a flamegraph for it:
$ memray flamegraph memray-manage.py.724.bin
โฆand it worked! Kudos to the Memray team for making their output format usable even when incomplete.
This more detailed flamegraph revealed more than 50% of the memory usage was allocated in ModelState.render(), which creates temporary model classes:
class ModelState:
...
def render(self, apps):
"""Create a Model object from our current state into the given apps."""
...
return type(self.name, bases, body)
This information hinted that these temporary model classes were hanging around beyond their expected short lifetime, leading to the memory leak. For example, every model class could also end up in a list intended for debugging, but accidentally extending the lifetime of these temporary classes.
I decided to dig a bit deeper using machete-mode debugging, with the below snippet that captures the temporary model classes and logs details about them. I wrote this within the Django settings file, where it was guaranteed to run at Django startup time, before the migrate management command.
import atexit
import gc
import tracemalloc
import weakref
from itertools import islice
from django.db.migrations.state import ModelState
tracemalloc.start(2)
orig_render = ModelState.render
rendered_classes = weakref.WeakSet()
def wrapped_render(*args, **kwargs):
cls = orig_render(*args, **kwargs)
rendered_classes.add(cls)
return cls
ModelState.render = wrapped_render
@atexit.register
def show_referrers():
print(f"๐ฏ {len(rendered_classes)} classes referred to.\n")
for cls in islice(rendered_classes, 2):
print(f"๐๐๐ {cls!r} ๐๐๐")
for i, referrer in enumerate(gc.get_referrers(cls), start=1):
print(f"๐ Referrer #{i}: {referrer!r}")
if tb := tracemalloc.get_object_traceback(referrer):
print("\n".join(tb.format(most_recent_first=True)))
print()
print()
print()
Note:
tracemalloc.start()starts Python's built-in memory allocation tracking.- The
ModelState.render()method was monkeypatched with a wrapper that stores every temporary model class in a WeakSet. - The
@atexit.register-decorated function runs at the end of the program, and logs two things. - The first piece of logging is the number of temporary model classes still alive at the end of the program, which should be close to zero. (Some may stick around from the final migration state.)
- The second piece of logging iterates over the first two live temporary model classes and logs their name and their referring objects, discovered via
gc.get_referrers(). For each referring object, it also logs the traceback of where that object was allocated, usingtracemalloc.get_object_traceback()(which is whytracemalloc.start()was needed at the beginning). - The emojis are a bit of fun to make the log messages easier to skim through. I have no idea why I picked ๐ and ๐!!
The output from this hook was voluminous, even with the limit to the first two live classes. For example, here's the output for a temporary ContentType model class:
๐๐๐ <class '__fake__.ContentType'> ๐๐๐
๐ Referrer #1: <generator object WeakSet.__iter__ at 0x1234ef300>
File "/.../example/core/apps.py", line 45
for cls in islice(rendered_classes, 2):
...
๐ Referrer #11: {'name': 'model', ..., 'model': <class '__fake__.ContentType'>}
File "/.../.venv/lib/python3.14/site-packages/django/utils/functional.py", line 47
res = instance.__dict__[self.name] = self.func(instance)
File "/.../.venv/lib/python3.14/site-packages/django/db/models/fields/__init__.py", line 1210
self.validators.append(validators.MaxLengthValidator(self.max_length))
I checked the live referrers for a few classes, and they all seemed to be expected. However, it did reveal just how many cycles exist between ORM objects. For example, model classes refer to their field objects, which in turn refer back to their model classes, thanks to Django's Field.contribute_to_class() creating this reference:
def contribute_to_class(self, cls, name, private_only=False):
...
self.model = cls
...
Anyway, from comparing the output between Python 3.13 and 3.14, I could see that no new references were being created on Python 3.14. It seemed likely that the incremental garbage collection algorithm was the culprit.
The workaround
Given the investigation, I wanted to work around the issue by forcing a full garbage collection sweep with gc.collect() after each migration file ran. I came up with the below code, saved as management/commands/migrate.py in one of the project's Django apps. It extends the default migrate command to run gc.collect() after each successful migration (where "apply" is forwards and "unapply" is backwards).
import gc
from django.core.management.commands.migrate import Command as BaseCommand
class Command(BaseCommand):
"""Extended 'migrate' command."""
def migration_progress_callback(self, action, migration=None, fake=False):
"""
Extend Django's migration progress reporting to force garbage
collection after each migration. This is a workaround to keep memory
usage low, especially because we have a low limit on Heroku. It seems
the incremental garbage collector introduced in Python 3.14 cannot
keep up with the migration process's tendency to create many cyclical
objects, so our best fallback is to force collection of everything
after each migration is applied or unapplied.
https://adamj.eu/tech/2026/04/20/django-python-3.14-incremental-gc/
"""
super().migration_progress_callback(action, migration=migration, fake=fake)
if action in ("apply_success", "unapply_success"):
gc.collect()
It felt a bit hacky, but it did the trick! The review app succeeded to launch, showing a flat memory profile as before.
We then continued to deploy to staging and production without any issues, and the team have been happily using Python 3.14 for over a month now.
Fin
Well, that's where the tale ends right now. After the incremental garbage collection algorithm is reverted in Python 3.14.5, I guess I'll be able to remove this workaround.
While it would be nice to have incremental garbage collection work well, it's clear that the current implementation has some issues. I think the core team is making the right call reverting it, but hopefully there will be energy to improve the feature for the future.
May your garbage be collected efficiently and without fuss,
-Adam
20 Apr 2026 4:00am GMT
18 Apr 2026
Django community aggregator: Community blog posts
Issue 333: Django News - 30% Off PyCharm Pro โ 100% for Django
Django News Newsletter is moving!
Just a quick heads up. We're planning to move our newsletter to a new platform next week.
If things look a little different when it shows up, it's still us.
News
PyCharm & Django annual fundraiser
JetBrains and the Django Software Foundation team up again to offer 30% off PyCharm while matching donations to fund Django's core development and community programs.
New Technical Governance - request for community feedback
Django proposes a simpler, more flexible technical governance model and is inviting community feedback ahead of a planned July 2026 rollout.
Could you host DjangoCon Europe 2027? Call for organizers
DjangoCon Europe 2026 is happening right now in Athens, Greece but plans for 2027 have already begun. This post lays out all the resources for any questions, support, and more for future organizers.
Reverting the incremental GC in Python 3.14 and 3.15 - Core Development
Python is rolling back its new incremental garbage collector in 3.14 and 3.15 after real-world memory issues, reverting to the proven generational model while rethinking a future reintroduction.
PEP 772: Packaging Council governance process (Round 3) - Packaging / Coordination
PEP 772 has officially been approved, creating a new Python Packaging Council to guide the future of packaging standards, tools, and ecosystem governance.
Django Software Foundation
Django Has Adopted Contributor Covenant 3
The 3.0 edition of the new Code of Conduct is here! This milestone represents the completion of a careful, community-driven process that began earlier this year.
DSF Board monthly meeting, April 9, 2026
The Django Software Foundation approved a modernized Code of Conduct, new working group charters, and key community initiatives, signaling a fresh push toward clearer governance and sustained project growth.
Python Software Foundation
PyCon US 2026: Why we're asking you to think about your hotel reservation
For many years, PyCon US has relied on hotel booking commissions to help pay for conference space. If you are attending this year, please use an official hotel to be both close to the venue.
Python Software Foundation News: Reflecting on Five Years as the PSF's First CPython Developer in Residence
ลukasz Langa looks back on five years and highlights including the transition to GitHub issues from bugs.python.org, the replacement of the mostly manual CLA process with an automated system, the introduction of free threading to Python, and the replacement of the interactive shell in the interpreter. Also while addressing thousands of bugs, he's witnessed the full-time paid developer in residence roster at the Python Software Foundation grow from one person to five.
Updates to Django
Today, "Updates to Django" is presented by Johanan Oppong Amoateng from Djangonaut Space! ๐
Last week we had 12 pull requests merged into Django by 10 different contributors - including a first-time contributor! Congratulations to Jonathan Wu for having their first commits merged into Django - welcome on board!
This week's Django highlights: ๐ฆ
Django Fellow Reports
Fellow Report - Natalia
A good chunk of this week focused on improving contributor workflows and reducing review overhead by introducing automated quality checks for PRs :robot:. This builds on prior experimentation (thanks @frankwiles) and seeks to provide early, actionable feedback for PR authors while helping maintainers focus on substantive review. We also had a flood of overly verbose and low quality reports from the same person, which I closed eagerly making use of the recent new guidelines we published in the security policy.
Fellow Report - Jacob
The last report before DjangoCon Europe. Lots of tickets triaged, reviewed, authored, discussed, and the usual kaleidoscope of miscellaneous tasks.
Django Fellow Report - Sarah
Django Fellow Sarah Boyce returns from maternity leave with part-time updates, tackling triage, reviews, security work, and GSoC prep while navigating connectivity challenges from Turkey.
Articles
Enforce Business Logic in the Database with Django
A practical guide to enforcing business logic at the database layer in Django using transactions, select_for_update locks, and CheckConstraint / UniqueConstraint to prevent race conditions and invalid data rather than relying on application-level validation.
Let's talk about LLMs
James Bennett consolidates his thoughts on AI/LLMs in this wide-ranging piece, ending with a call to invest in software fundamentals instead of racing to adopt the latest AI craze.
Django Table, Filter and Export With Htmx
A reusable pattern for combining django-tables2, django-filter, and HTMX into a single generic view and template. Very cool stuff.
Decoupling Your Business Logic from the Django ORM
Carlton Gibson's latest The Stack Report is a detailed dive into business logic and how to handle it in Django. This is a perennial topic, but he comes at it with decades of experience and wisdom.
djust 0.4.0 - The Developer Experience Release
djust 0.4.0 is about developer experience - making everyday tasks faster, safer, and more intuitive. 30+ new features, critical bug fixes, and a security hardening pass that eliminated every known vulnerability.
Why aren't we uv yet?
A decent chunk of new Python repos already use uv. Coding agents still overwhelmingly recommend pip and requirements.txt, while many users prefer uv.
Events
Are You Attending PyCon, or Orbiting It?
PSF Board Member Georgi Ker makes a personal case for booking hotels via the official PyCon US website before April 24th.
Design Articles
Under the hood of MDN's new frontend
From 2-min dev server starts to 2s. They rewrote MDN's entire frontend, ditching the React SPA for Lit web components, server components, and Rspack. The result: less JS shipped, scoped CSS, and a build pipeline that just works.
Videos
Debunking Django Myths - Sarah Boyce at PyTV
Django Fellow Sarah Boyce gave a talk recently at PyTV titled, "Django Has a Marketing Problem: Debunking the Myths That Won't Die." It is a fantastic overview of what Django does well and what it can improve.
Incremental Typing in Django - Carlton Gibson
Former Django Fellow and current Django Chat podcast host Carlton Gibson, recently gave a talk titled, "Static Islands, Dynamic Sea: Some Thoughts on Incremental Typing." In it he talks about why Python's dynamic nature is a feature, not a bug, and demonstrates Mantle - a library of utilities for typing around Django's liquid core.
Sponsored Link 2
Annual PyCharm Promo - 30% off, all money goes to Django
The annual PyCharm + Django promotion is live until May 1st. This is the single biggest fundraiser for Django and has raised over $350,000 since 2016.
Podcasts
Django Tasks - Jake Howard
Episode 200(!) features Jake Howard, a Senior Systems Engineer at Torchbox and the author of DEP 14, django.tasks, the highlight feature in Django 6.0. We discuss his work on the Django security team, work with Wagtail, AI dabblings, and more.
Django Job Board
Python Developer at Open Data Services
Remote UK role building Python data systems for social-impact projects, offering ~ยฃ48k plus profit share in a collaborative worker co-op.
Projects
yassi/dj-signals-panel
Display registered Django signals and receivers, showing what fires and where.
dvf/opinionated-django
An opinionated Django project with Repository pattern, Pydantic DTOs, svcs DI, and Stripe-style ULID IDs
18 Apr 2026 3:47am GMT
17 Apr 2026
Django community aggregator: Community blog posts
Django News - 30% Off PyCharm Pro โ 100% for Django - Apr 17th 2026
Introduction
Django News Newsletter is moving!
Just a quick heads up. We're planning to move our newsletter to a new platform next week.
If things look a little different when it shows up, it's still us.
Django Newsletter
News
PyCharm & Django annual fundraiser
JetBrains and the Django Software Foundation team up again to offer 30% off PyCharm while matching donations to fund Django's core development and community programs.
New Technical Governance - request for community feedback
Django proposes a simpler, more flexible technical governance model and is inviting community feedback ahead of a planned July 2026 rollout.
Could you host DjangoCon Europe 2027? Call for organizers
DjangoCon Europe 2026 is happening right now in Athens, Greece but plans for 2027 have already begun. This post lays out all the resources for any questions, support, and more for future organizers.
Reverting the incremental GC in Python 3.14 and 3.15 - Core Development
Python is rolling back its new incremental garbage collector in 3.14 and 3.15 after real-world memory issues, reverting to the proven generational model while rethinking a future reintroduction.
PEP 772: Packaging Council governance process (Round 3) - Packaging / Coordination
PEP 772 has officially been approved, creating a new Python Packaging Council to guide the future of packaging standards, tools, and ecosystem governance.
Django Software Foundation
Django Has Adopted Contributor Covenant 3
The 3.0 edition of the new Code of Conduct is here! This milestone represents the completion of a careful, community-driven process that began earlier this year.
DSF Board monthly meeting, April 9, 2026
The Django Software Foundation approved a modernized Code of Conduct, new working group charters, and key community initiatives, signaling a fresh push toward clearer governance and sustained project growth.
Python Software Foundation
PyCon US 2026: Why we're asking you to think about your hotel reservation
For many years, PyCon US has relied on hotel booking commissions to help pay for conference space. If you are attending this year, please use an official hotel to be both close to the venue.
Python Software Foundation News: Reflecting on Five Years as the PSF's First CPython Developer in Residence
ลukasz Langa looks back on five years and highlights including the transition to GitHub issues from bugs.python.org, the replacement of the mostly manual CLA process with an automated system, the introduction of free threading to Python, and the replacement of the interactive shell in the interpreter. Also while addressing thousands of bugs, he's witnessed the full-time paid developer in residence roster at the Python Software Foundation grow from one person to five.
Updates to Django
Today, "Updates to Django" is presented by Johanan Oppong Amoateng from Djangonaut Space! ๐
Last week we had 12 pull requests merged into Django by 10 different contributors - including a first-time contributor! Congratulations to Jonathan Wu for having their first commits merged into Django - welcome on board!
This week's Django highlights: ๐ฆ
-
Added
user_perm_strhelper function that can be used when checking user permission usinghas_perm(). (#37021) -
The task decorator was updated to accept
**kwargsand forward them totask_class, allowing additional parameters to be passed to custom Task subclasses. (#36816)
Django Newsletter
Django Fellow Reports
Fellow Report - Natalia
A good chunk of this week focused on improving contributor workflows and reducing review overhead by introducing automated quality checks for PRs :robot:. This builds on prior experimentation (thanks @frankwiles) and seeks to provide early, actionable feedback for PR authors while helping maintainers focus on substantive review. We also had a flood of overly verbose and low quality reports from the same person, which I closed eagerly making use of the recent new guidelines we published in the security policy.
Fellow Report - Jacob
The last report before DjangoCon Europe. Lots of tickets triaged, reviewed, authored, discussed, and the usual kaleidoscope of miscellaneous tasks.
Django Fellow Report - Sarah
Django Fellow Sarah Boyce returns from maternity leave with part-time updates, tackling triage, reviews, security work, and GSoC prep while navigating connectivity challenges from Turkey.
Sponsored Link 1
You know @login_required. Now meet @app.reasoner(). AgentField turns Python functions into production AI agents, structured output, async execution, agent discovery. Every decorator becomes a REST endpoint. Open source, Apache 2.0. Python, Go & TypeScript SDKs.
Articles
Enforce Business Logic in the Database with Django
A practical guide to enforcing business logic at the database layer in Django using transactions, select_for_update locks, and CheckConstraint / UniqueConstraint to prevent race conditions and invalid data rather than relying on application-level validation.
Let's talk about LLMs
James Bennett consolidates his thoughts on AI/LLMs in this wide-ranging piece, ending with a call to invest in software fundamentals instead of racing to adopt the latest AI craze.
Django Table, Filter and Export With Htmx
A reusable pattern for combining django-tables2, django-filter, and HTMX into a single generic view and template. Very cool stuff.
Decoupling Your Business Logic from the Django ORM
Carlton Gibson's latest The Stack Report is a detailed dive into business logic and how to handle it in Django. This is a perennial topic, but he comes at it with decades of experience and wisdom.
djust 0.4.0 - The Developer Experience Release
djust 0.4.0 is about developer experience - making everyday tasks faster, safer, and more intuitive. 30+ new features, critical bug fixes, and a security hardening pass that eliminated every known vulnerability.
Why aren't we uv yet?
A decent chunk of new Python repos already use uv. Coding agents still overwhelmingly recommend pip and requirements.txt, while many users prefer uv.
Events
Are You Attending PyCon, or Orbiting It?
PSF Board Member Georgi Ker makes a personal case for booking hotels via the official PyCon US website before April 24th.
Design Articles
Under the hood of MDN's new frontend
From 2-min dev server starts to 2s. They rewrote MDN's entire frontend, ditching the React SPA for Lit web components, server components, and Rspack. The result: less JS shipped, scoped CSS, and a build pipeline that just works.
Videos
Debunking Django Myths - Sarah Boyce at PyTV
Django Fellow Sarah Boyce gave a talk recently at PyTV titled, "Django Has a Marketing Problem: Debunking the Myths That Won't Die." It is a fantastic overview of what Django does well and what it can improve.
Incremental Typing in Django - Carlton Gibson
Former Django Fellow and current Django Chat podcast host Carlton Gibson, recently gave a talk titled, "Static Islands, Dynamic Sea: Some Thoughts on Incremental Typing." In it he talks about why Python's dynamic nature is a feature, not a bug, and demonstrates Mantle - a library of utilities for typing around Django's liquid core.
Sponsored Link 2
Annual PyCharm Promo - 30% off, all money goes to Django
The annual PyCharm + Django promotion is live until May 1st. This is the single biggest fundraiser for Django and has raised over $350,000 since 2016.
Podcasts
Django Tasks - Jake Howard
Episode 200(!) features Jake Howard, a Senior Systems Engineer at Torchbox and the author of DEP 14, django.tasks, the highlight feature in Django 6.0. We discuss his work on the Django security team, work with Wagtail, AI dabblings, and more.
Django Job Board
Python Developer at Open Data Services
Remote UK role building Python data systems for social-impact projects, offering ~ยฃ48k plus profit share in a collaborative worker co-op.
Projects
yassi/dj-signals-panel
Display registered Django signals and receivers, showing what fires and where.
dvf/opinionated-django
An opinionated Django project with Repository pattern, Pydantic DTOs, svcs DI, and Stripe-style ULID IDs
This RSS feed is published on https://django-news.com/. You can also subscribe via email.
17 Apr 2026 3:00pm GMT
Djangocon EU: zero-migration encryption - Vjeran Grozdanic
(One of my summaries of the 2026 Djangocon EU in Athens).
Full title: zero-migration encryption: building drop-in encrypted field in Django.
He works at Sentry. Huge site with a Django backend and thousands requests per second.
He had to add a new table to store 3rd party API credentials. Oh: should this be encrypted? Yes. But: each team has its own way to encrypt data. And there were at least 10 encryption keys here and there (as environment variables). And tens of places where encryption/decryption happens.
So: better to build a generic solution. Or use an existing generic solution. And yes, there are multiple libraries. EncryptedCharField looked nice. But the problem was all the existing data in the various places. Sentry is not a site that you can shut down for a while, so you have to do it with zero downtime. This means you can never change an existing column type.
A solution could be to add a new encrypted field next to the existing one. Then fill it and backfill it and make sure no new data is written to the old field and then you can remove the old field. But that's quite a job with all the different locations that had to be changed.
A Field class in Django has get_prep_value() and from_db_value(). Those are called before storing data in the database and after grabbing it from the database. You could create a new CharField-like field and start to encrypt values in get_prep_value and decrypt the other way.
You'd have to be able to recognise the old un-encrypted values. A solution: prefix encrypted values with enc:. Also key rotation can be handled this way, by including that in the prefix (enc:key2:).
But there's also a bjson field. They solved that by encrypting the json and writing a json to the database with the encrypted json in a field and also the encryption key info.
Unrelated photo explanation: a cat I encountered in Athens on an evening stroll in the neighbourhood behind the hotel.
17 Apr 2026 4:00am GMT
Djangocon EU: supply chain attacks on Python projects - Mateusz Beลczowski
(One of my summaries of the 2026 Djangocon EU in Athens).
Full title: what's in your dependencies? Supply chain attacks on Python projects.
How supply chain attacks work: attackers don't attack your code directly, they target something you trust. A typical Django project has lots of dependencies. Direct dependencies and "transitive dependencies", dependencies of our dependencies. If you depend on requests, requests itself will grab certify and urllib3.
Possible package attacks:
- Inject malicious code directly into the repo.
- Create malicious package. Typosquatting (abusing typos), slopsquatting (abusing typos made by LLMs). "Brandjacking": quickly after deepseek became popular, a deepseekai package was published that stole credentials.
- Compromise existing package. Credential stealing, CI/CD exploits.
What attackers typically do with access is to steal credentials. Environment variables, cloud keys (AWS_xyz), pypi tokens, ssh private keys, database URLs, saved passwords.
Example: num2words was hacked in July 2025. Phishing leading to maintainer credentials theft. Fake login page at pypj.org instead of pypi.org. Then they uploaded faulty releases with the captured credentials. Credentials weren't rotated, so a second attack happened a few days later. This malware targeted .pypirc files, leading to more compromises.
How can we defend from this kind of attacks? Depends on the kind of attack. When publishing via GitHub actions, use "trusted publishing", in that case there are no credentials to steal.
Another example: LiteLLM was compromised via trivy, a security scanner that itself was compromised... It in turn collected environment variables, secrets and ssh keys, bundled it all in a tarball and posted it to some legitimate-looking domain.
Some myths:
- "Lockfiles protect us". No, they only prevent accidental upgrades, not when adding a package for the first time.
- "Just don't install suspicious packages". Lots is installed via transitive dependencies.
- "We run everything in Docker so we're safe". It limits the blast radius, but credentials and environment variables are still at risk.
- "We can fully prevent attacks".
Some tips:
- Use dependency cooldowns. uv has "exclude-newer", pip has "uploaded-prior-to". Don't be the first to install a fresh release, as most malicious packages are discovered within hours or days.
- Pin versions and verify hashes.
Pypi is getting better:
- Trusted publishing.
- Project quarantine.
- Attestations: cryptographic tools to verify the source.
- Typosquatting protection.
AI has risks:
- Slopsquatting. Hallucinated package names that get exploited.
- Prompt injection via github issues.
- Agents often "just" pip-install things directly.
Note: AI can also be used to detect malware! A small project started after the LiteLLM compromise managed to detect a dangerous different compromise almost the moment it was published. Nice!
Unrelated photo explanation: a cat I encountered in Athens on an evening stroll in the neighbourhood behind the hotel. It was a cat on the hunt: relevant to the topic of this talk :-)
17 Apr 2026 4:00am GMT
Djangocon EU: lightning talks day 3
(One of my summaries of the 2026 Djangocon EU in Athens).
Announcement - Carlton Gibson
They've been working on improving the technical governance of Django. They'd like to get feedback. There's a blog post about it.
Oh, and look at the "30% off PyCharm" button on the django website, that raises quite a lot of funds for Django. PyCharm's sponsoring is a very sizeable financial part of Django, thanks!
Even more table partitioning with Django, Postgres and UUIDs - Tim Bell
(See his earlier talk on partitioning).
UUID is 128-bits, usually displayed as hex strings. It starts with the unix timestamp, followed by several random fields (in version 7). In version 8, you have more flexibility. You can customize it to put a specific value (an id of a related field in their case) in the first field.
Partitioning per UUID (they used it as their ID) then effectively also partitions on the related field.
Speeding up Django startup times with lazy imports - Anze Pecar
Imports in Python can be slow. Luckily, python has something build-in to check it, the "importtime" flag:
python -X importtime manage.py check
He worked around the packages he found by importing the package inside the functions where he used them. It worked, but it was ugly.
Look at things like post_worker_init in gunicorn, you can use that to pre-load the offending modules.
You can also wait for python 3.15. PEP810: explicit lazy imports!
PyLadies Seoul: rebooting a community for women in tech scenes - Hwayoung Cha
At Pycon Korea 2023 there were only three woman in attendance. So: time to re-start Pyladies Seoul! And with success. One of the new attendees is now a CTO of a company (and also a PyLadies volunteer herself).
They'll also start a Django workshop soon.
Join your local PyLadies chapter!
What I learned during learning to solve rubic cube - Venelin Stoykov
He learned solving a Rubic cube in about two weeks.
We can learn new things more easily by association with things we already know. We need to practice a lot. Repeat, repeat: that way we tell our brain that we need to remember it.
"Thinking slow and fast" is a book he recommends.
AI is like the fast thinking. Fast is also a bit sloppy and often a bit wrong.
If we really want to understand something, it takes time and work.
Why volunteering and contributing to communities is important - Alex Gรณmez
Get involved! Volunteer! Do some work! Volunteers are necessary.
Volunteering is a lot of work, but it is worth it.
Djangofmt, a Django template formatter written in rust - Thibaut Decombe
Djangofmt, a fast, html aware, django template formatter, written in Rust.
https://github.com/UnknownPlatypus/djangofmt
You can run it as a pre-commit hook.
Unrelated photo explanation: a cat I encountered in Athens in the morning near the hotel.
17 Apr 2026 4:00am GMT
Djangocon EU: auto-prefetching with model field fetch modes in Django 6.1 - Jacob Walls
(One of my summaries of the 2026 Djangocon EU in Athens).
There's an example to experiment with here: https://dryorm.xterm.info/fetch-modes-simple
Timeline: it will be included in Django 6.1 in August.
The reason is the 1+n problem:
books = Book.objects.all()
for book in books:
print(book.author.name)
# This does a fresh query for author every time.
You can solve it with select_related(relation_names) or prefetch_related(relation_names). The first does an inner join. The second does two queries.
But: you might miss a relation. You might specify too many relations, getting data you don't need. Or you might not know about the relation as the code is in a totally different part of the code.
Fetch mode is intended to solve it. You can append .fetch_mode(models.FETCH_xyz) to your query:
- models.FETCH_ONE: the current behaviour, which will be the default.
- models.FETCH_PEERS: Fetch a deferred field for all instances that came from the same queryset. More or less prefetch_related in an automatic, lazy manner.
- models.FETCH_RAISE: useful for development, it will raise FieldFetchBlocked. And it will thus tell you that you'll have a performance problem and that you might need FETCH_PEERS
This is what happens:
books = Book.objects.all().fetch_mode(models.FETCH_PEERS)
for book in books:
# We're iterating over the query, so the query executes and grabs all books.
print(book.author.name)
# We accessed a relation, so at this point the prefetch_related-like
# mechanism ist fired off and all authors linked to by the books are
# grabbed in one single query.
You can write your own fetch modes, for instance if you only want a warning instead of raising an error.
Unrelated photo explanation: a cat I encountered in Athens on an evening stroll in the neighbourhood behind the hotel.
17 Apr 2026 4:00am GMT
Djangocon EU: How Django is helping to build the biggest X-ray observatory to date - Loes Crama
(One of my summaries of the 2026 Djangocon EU in Athens).
She works at Cosine, they develop measurement systems and space instrumentation. They work for the space industry (ESA, NASA, etc).
They're now working on "high-energy optics", the NewAthena x-ray observatory, the biggest one to date. NewAthena: NEW Advanced Telescope for High-ENergy Astrophysics. Planned launch is in 2037 on Ariane 6.4.
Talking about rocket science is cool, but where's the software? Within the company, software is an internal service, supporting scientists. Handling data in many ways: visualization, analysis, processing, management. Django plays a big role in all of this.
When you build something with Django in a scientific context, you really need to understand the data. Workflows must be flexible. R&D and production often don't need to be strictly separated. Multiple datastores for various purposes (like an extra MongoDB, for instance) is often handy.
Their application consists of:
- SXRO (silicon x-ray optics) database.
- A Mysql database.
- Django.
The goal is to track all the components that go into the observatory. Status and quality. Configuration and geometry. Component relationships. Inspections. History of all the components.
The default Django admin is their primary method of using the application. Often, it is said that the admin is not not not intended for end users. But they're using it anyway. It is an internal tool for technical people. Most of them have a PhD: they can handle such an interface. They've been using it for years.
There are some third party packages:
- django-simple-history: easy history.
- djangoql: advanced queries for the search bar.
- django-admin-rangefilter, django-admin-list-filter-dropdown, django-admin-numeric-filter: little tools to tweak the filters on the right hand side.
There are some separate forms, mostly for actions performed in the lab or cleanroom. For instance a form where you can use an ipad to indicate defects in one of the components by just drawing on the picture of the component.
There's also a REST API. Other software and data tools can use it to integrate with Django:
- Observability tools (prometheus/grafana).
- JupyterHub.
- Stacking robots.
They use: djangorestframework, drf-spectacular (API docs), django-filter (filtering via GET parameters).
Django is their software backbone. A general-purpose framework that's well suited for a scientific context.
Unrelated photo explanation: a cat I encountered in Athens on an evening stroll in the neighbourhood behind the hotel.
17 Apr 2026 4:00am GMT


