Takeaways from DjangoCon EU 2025
tl;dr:
Dublin and the Django community are awesome.
Zach Bellay published on
12 min, 2212 words
Here are some of the most interesting things I learned at DjangoCon EU 2025 in Dublin, Ireland, partially written with the help of AI: link to talks
My list of the best talks are at the bottom.

Database
- How to lock DB rows from Django:
select_for_update
locks a row prior to making changes, ensuring data consistency in concurrent environments. - Move to BigInt Primary Keys ASAP: Always use a BigInt (64 bits) or UUID for primary keys. If your table is nearing 2.1 billion entries (the 32-bit integer limit), you can use negative values to double the range, but this comes with caveats. Talk
- Partition DB Tables by Tenant: The
PostgresPartitionedModel
mixin helps partition data into separate PostgreSQL partitions based on a value, improving performance for large tables.- see
django-postgres-extra
package for more details Github
- see
- Save 99.8% on space in Postgres Indexes: Always explicitly set
db_index
on foreign keys. By default, foreign keys are indexed, but you can optimize further:- PostgreSQL builds indexes for null values, but you can add a condition to an
Index
to dramatically reduce index size (up to ~99% smaller).
# Partial index example class Restaurant(models.Model): restaurant_chain = models.ForeignKey(..., db_index=False) class Meta: indexes = [ models.Index( fields=["restaurant_chain"], condition=~models.Q(restaurant_chain=None), ), ]
- PostgreSQL builds indexes for null values, but you can add a condition to an
- Write Performance Tests in Pytest: Write tests that load data into the DB and time how long views take to ensure good performance (or see regressions).
- Check Laptop vs Cloud Server IO Speed: If your DB/app is slower in the cloud, compare cloud disk speed with your laptop's disk speed to see if the bottleneck is hardware or I/O.
- TODO: Insert command that can do this (will need to find this one talks are posted on YouTube)
- TCP_NODELAY and Nagle's Algorithm: If you're experiencing a bottleneck of around 25 requests/sec or 40ms per call, it might be due to TCP_NODELAY or Nagle's algorithm. These can be disabled using environment variables to improve performance.
Tools & Libraries
strace
: A Linux utility for inspecting system calls made by a process (doesn't require root).django-neopolitan
: Use theCRUDView
for easy CRUD views (from the first htmx talk).django-auto-prefetch
: Automatically prefetches related objects to reduce DB queries. GitHubdjango-csp
: Content Security Policy for django -- is going to be merged into Django core.django-otp-webauthn
: Enables Face ID or fingerprint login (passkey support). Talk repodjango-two-factor-auth
: For 2FA/MFA in Django.silence-lint-error
: Add inline linter silencing to gradually introduce linting rules. PyPI- Use inline linter silencing to gradually enforce linting rules ("plug the leak, then bail out the boat").
MaxMind
: Recommended for blocking "bad people" (not just bots) using their database.- a bad bot being some script that is hitting
/xmlrpc.php
versus a bad person being someone who is maliciously solving captcha's, using legit looking emails/phone numbers, and doing bad things to your site (like trying to host crypto miners, etc)
- a bad bot being some script that is hitting
dj-angles
: Use HTML-like elements in Django templates, e.g.instead of {% include 'partial.html' %} Docs
Best Practices
- Dump sqlmigrate in PRs: Set up a GitHub Action so that any PR with a migration outputs the contents of
sqlmigrate
, forcing devs to review the generated SQL.- stated example was so that
- Count DB Queries in Tests: In pytest, count the number of queries per test and fail if above a threshold. Add a decorator to bypass for WIP or exceptions. The purpose is to find code that make excessive DB queries that you wouldn't expect.
- In the talk, speaker showed some innocent code like
create_customer_profile()
which had 36K DB queries
- In the talk, speaker showed some innocent code like
- Clean Up Old Flags: Avoid reusing old feature flags -- see the Knightmare ($460M mistake) for why. Read more
Django & Community
- Django Admin Customization: The head of Canonical engineering linked a django spreadsheet like application for managing Canonical software quality Django dashboard Github
- I thought it was cool for 2 reasons
- 1 : very dense information layout w/ table
- 2 : highly customized django admin, though talked w/ the author, and he said he thinks it's super hacky and not maintainable, and that he wants to move it to move it outside of django admin and use htmx
- 1 : very dense information layout w/ table
- I thought it was cool for 2 reasons
- Django Feature Proposals: Now discussed on GitHub issues! See here -- this is great since Github is where developers live.
- Django Template Backend written in Rust: A Django template rendering backend written in Rust is in development. GitHub
- Roasting App: Roasting app made with htmx, makes use of hyperscript, which at the very least is an interesting case study GitHub
Modeling & Architecture
- Schema-aware EAV Modeling: For apps where users define their own models/forms, a generic EAV (Entity-Attribute-Value) system can help. Example:
Talk linkboat = Entity.objects.with_attributes(object="MaritimeBoat").first() print(boat.size) # 32 meters
Templates & Misc
{% spaceless %}
: Template tag to remove spaces in Django templates.- B+ Tree: High-level overview of B+ tree data structures.
Some Companies using Django
- Octopus Energy : UK/Australia energy company
- Divio : django hosting for agencies
- codered.cloud : easy django hosting
- Monit : parking management system
- Gem Logic: Jewelry ERP
- Zelthy: Custom healthcare app development platform in India
Platforms & Things to Check Out
- Divio: Platform for agencies to easily host multiple Django projects.
- Django Static Site Generators:
- 100 Words/Day Blog: softwarecrafts.uk/100-words
Vibes
- seems like people prefer
django-cotton
overdjango-components
because of the HTML like syntax - there was much talk about how django's governance as a project, and basically only a tiny minority participates or contributes (superstars)
(What I noticed as an American in Europe)
- everyone was friendly, life essentials in Europe seem much, much better than in the US -- Germans don't pay for college, have state sponsored healthcare, no such thing as "at-will" employment, excellent public transit, much cheaper childcare compared to the US, etc
- Lots of conference goers worked for the government
- Dublin is also experiencing a cost of living crisis, facing NIMBYism to upzone.
- All Ubers in Dublin were actually licensed taxi drivers, which were hailed via the app. This seemed much less exploitative of the drivers than the typical gigified Uber driver.
- Comparing SF to Dublin, there was virtually no homelessness or crazy people on the streets, and no poop on the streets (I hate to play into the narrative, but it was true, I also did go to the touristy areas though)
The Best Talks
I went in with low expectations, since the the talk titles did not seem great, but I was blown away by the quality of many of the talks. Some of the best talks (which I will be re-watching once they are released on YouTube):
- Turn back time: Converting integer fields to bigint using Django migrations at scale
- Data-Oriented Design
- by Adam Johnson (adamchainz) who maintains many popular django packages
- Django + HTMX: Patterns to Success
- How to get Foreign Keys horribly wrong in Django
- 100 Million Parking Transactions Per Year with Django
- Dynamic models without dynamic models
- Just-in-Time Development with Django and HTMX: Faster, Leaner, and Smarter
- I talked to this speaker afterward, and asked him how they did nested modals + updating widgets in a form after creating a new object in a nested modal. He showed me how he did it, I've been trying to figure this out for 8 months!
- Anatomy of a Database Operation
- Django Admin at Scale: From Milliseconds to Microseconds
- many lightning talks were great since speakers had to just get to the meat of the subject
Tags: post