18 Mar 2026
Django community aggregator: Community blog posts
PyCon US 2026 - Elaine Wong & Jon Banafato
π Links
- PyCon US website
- Volunteer mailing list
- Elaine on LinkedIn and Jon's personal site
π₯ 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 sixfeetup.com.
18 Mar 2026 10:00pm GMT
Tombi, pre-commit, prek and uv.lock
In almost all my Python projects, I'm using pre-commit to handle/check formatting and linting. The advantage: pre-commit is the only tool you need to install. Pre-commit itself reads its config file and installs the formatters and linters you defined in there.
Here's a typical .pre-commit-config.yaml:
default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml args: [--allow-multiple-documents] - id: check-toml - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.15.6 hooks: # Run the linter. - id: ruff args: ["--fix"] # Run the formatter. - id: ruff-format - repo: https://github.com/tombi-toml/tombi-pre-commit rev: v0.9.6 hooks: - id: tombi-format args: ["--offline"] - id: tombi-lint args: ["--offline"]
The "tombi" at the end might be a bit curious. There's already the build-in "check-toml" toml syntax checker, right? Well, tombi also does formatting and schema validation. And in a recent project, I handled configuration through toml files.
It was for a Django website where several geographical maps were shown, each with its own title, description, legend yes/no, etcetera. I made up a .toml configuration format so that a colleague could configure all those maps without needing to deal with the python code. I created a json schema as format specification (yes, json is funnily used for that purpose). With tombi, I could make sure the config files were valid.
Oh, and tombi has an LSP plugin, so I my colleague got autocomplete and syntax help out of the box. nice.
I'm also using uv a lot. That generates an uv.lock file, in .toml format, with all the version pins. It is a toml file, but without the .toml extension. So pre-commit ignored it. Until suddenly it started complaining about the indentation. But only in a github action, not locally.
Note: the complaint about the indentation is probably correct, as there's an issue in the uv bugtracker about changing the indentation from 4 to 2 in the lockfile.
The weird thing for me was that I pin the the versions of the plugins. So the behaviour locally and on github should be the same. Some observations:
- Running tombi from the commandline on uv.lock resulted in re-formatting to two spaces, whatever the tombi version.
- Pre-commit locally did not re-format the file, but pre-commit on the server did.
- I tried it with the new rust-based alternative for pre-commit, prek (see https://github.com/j178/prek), which did re-format uv.lock.
Some further debugging showed that pre-commit was actually skipping the uv.lock file. But apparently not on github. I did some searching in pre-commit's source code and tombi's pre-commit hook definition. The only relevant part there was types: [toml]. So somehow pre-commit has a definition of what a toml file is. But I couldn't find anything.
Until I spotted that pre-commit uses identify as the means to detect file types. (Looks like a handy library, btw!). And that project had a change a couple of weeks ago that identifies uv.lock as a toml file!
- My colleague updated his pre-commit installation and yes: uv.lock was getting re-formatted.
- So: github actions had a newer version than we had.
- Weird, as I just updated my python tool install this morning. Ah: I installed it with homebrew instead of uv tool, that's why it is still older.
Anyway: small mystery solved.
18 Mar 2026 4:00am GMT
16 Mar 2026
Django community aggregator: Community blog posts
Built with Django β Weekly Roundup (Mar 09βMar 16, 2026)
Hey, Happy Monday!
Why are you getting this: *You signed up to receive this newsletter on Built with Django. I promised to send you the latest projects and jobs on the site as well as any other interesting Django content I encountered during the month. If you don't want to receive this newsletter, feel free to unsubscribe anytime.
Sponsor
This issue is sponsored by TuxSEO - your AI content team on auto-pilot.
- Plan and ship SEO content faster
- Generate practical, publish-ready drafts
- Keep your content pipeline moving every week
Projects
- Table of Contents Generator - Generate a clickable Table of Contents for any PDF in seconds. Free, private, no account required. Works with reports, eBooks, manuals, and papers.
Jobs
From the Community
- Django Admin: Building a Production-Ready Back Office Without Starting From Scratch | Medium by Anas Issath
- Beginner's Guide to Open Source Contribution | Djangonaut Space 2026 - DEV Community
- Django Tutorial - GeeksforGeeks
Support
You can support this project by using one of the affiliate links below. These are always going to be projects I use and love! No "Bluehost" crap here!
- Buttondown - Email newsletter tool I use to send you this newsletter.
- Readwise - Best reading software company out there. I you want to up your e-reading game, this is definitely for you! It also so happens that I work for Readwise. Best company out there!
- Hetzner - IMHO the best place to buy a VPS or a server for your projects. I'll be doing a tutorial on how to use this in the future.
- SaaS Pegasus is one of the best (if not the best) ways to quickstart your Django Project. If you have a business idea but don't want to set up all the boring stuff (Auth, Payments, Workers, etc.) this is for you!
16 Mar 2026 6:00pm GMT