Adam Johnson
adamj.eu
Adam Johnson
@adamj.eu
🐴 @djangoproject.com blogger and contributor
✍️ Author of three books on Django and Git
🍕 Django London co-organizer
🇬🇧 London / 🇵🇹 Lisbon
Yes! All versions down to 1.8 are available for offline instant search.
October 8, 2025 at 9:53 PM
🕰️ time-machine 2.17.0 is out!

🧀 support and wheels for Python 3.14 and free-threaded builds
➡️ new CLI to help migrate from freezegun to time-machine
📚 docs now on Read the Docs
✨ new retro-futuristic logo

time-machine.readthedocs.io/en/latest/ch...

#Python
August 5, 2025 at 3:32 PM
My fantastic technology will fix up to 100% of your impossible problems.
July 23, 2025 at 8:37 PM
I didn’t share for a while... here’s where BYGHDX is at: 250 pages as of yesterday. It’s approaching completion, with just Issues and PRs to cover before release.
July 7, 2025 at 8:43 AM
#Git mini tip:

Use `git rev-list --count @` to count the number of commits in your repository, as reachable from HEAD (alias @).

This command supports many of the commit limiting options available in `git log`, such as `--grep` to search commit messages.

Full post: adamj.eu/tech/2024/11...
July 3, 2025 at 8:52 AM
Met @anthonypjshaw.bsky.social and got ice cream in this UK heatwave!
July 1, 2025 at 1:14 PM
Leake Street Arches

#London #Graffiti
June 3, 2025 at 2:10 PM
👨‍🎨 I made a logo for django-htmx too, what do you think?

django-htmx.readthedocs.io/en/latest/

#Django
April 25, 2025 at 11:07 AM
🎨 django-upgrade now has a swish logo!

📖 And its documentation has moved to ReadThe Docs!

👉 Check it out at django-upgrade.readthedocs.io/en/latest/

#Django
April 24, 2025 at 3:05 PM
#Git mini tip

Limit the 'git log' to a certain time period with '--since' and '--until'.
April 21, 2025 at 3:22 PM
#GitHub mini tip:

Use the GitHub CLI command `gh issue develop -c` to create and checkout a local branch linked to the given issue. No need to name the branch, and when you later run `gh pr create`, the pull request will be linked to the issue automatically.
April 20, 2025 at 9:04 AM
#Git mini tip:

Acknowledge co-authors with a 'co-authored-by' trailer at the end of your commit message, like:

co-authored-by: Otter Coder

GitHub, GitLab, and some other Git hosts will parse such trailers and show co-authors’ avatars alongside your own for that commit.
April 16, 2025 at 1:30 PM
#GitHub mini tip:

Many gh (GitHub CLI) commands support -w (--web) to open the respective page in the browser. For example, 'gh pr view -w' opens the pull request for the current branch in the browser.
April 15, 2025 at 9:16 AM
#htmx tip:

Use htmx.logAll() to log all htmx events to the console. Great for debugging which events are triggering or not!
April 14, 2025 at 9:53 AM
3. Form `BoundField` customization.
This change makes it easier to customize some parts of your forms’ rendered HTML, such as their <label> tags.
April 7, 2025 at 11:16 AM
2. Composite primary key support.
You can now use relational databases’ support for tables with a multi-column primary key, unlocking better designs and interoperability with existing databases.
April 7, 2025 at 11:16 AM
Django 5.2 came out last week, yay!

I’ve just written my round-up highlighting my favourite new features: adamj.eu/tech/2025/04...

Quick highlights-of-the-highlights:

1. The shell command now imports your model classes automatically.
You can customize this with more imports.

#Django
April 7, 2025 at 11:16 AM
#Python mini tip:

The easiest way to create a signature-preserving function decorator is with `contextlib.contextmanager`. Use it on a generator function with one `yield` statement, and it will create a combined context manager and function decorator.
April 1, 2025 at 9:18 AM
Lots of quirky facts on the Wikipedia front page today

en.wikipedia.org/wiki/Main_Page
April 1, 2025 at 8:55 AM
When #Git commit messages are meaningless
March 31, 2025 at 11:01 AM
+67 pages, +3 chapters, fresh beta sent out. If you're interested, let me know.

Back to coding for the rest of the week.
March 25, 2025 at 1:53 PM
#GitHub tip:

Don’t post “Any updates?” style comments on open source threads. Any updates would be there already. Open source is a gift; bugging maintainers acts like you're entitled to results. I just mark such comments as spam.
March 25, 2025 at 12:42 PM
Django + htmx tip:

Use hx-headers to pass Django’s CSRF token with all requests. This allows htmx to make data-modifying requests with methods like POST or PUT.

More details: django-htmx.readthedocs.io/en/latest/ti...

#Django #htmx
March 25, 2025 at 10:25 AM
I added a "vibe-coding" reference in my GitHub book, on the chapter about GitHub-Flavoured Markdown... will this be the first book to mention the term? 😂

(By the way, this is showing the “Alert“ syntax: docs.github.com/en/get-start...)

#GitHub #AI
March 22, 2025 at 10:46 AM
#Git mini tip:

Enable `log.follow` globally to have `git log` always follow renames when checking the log for a single file. Otherwise, you need to remember the `--follow` option.
March 21, 2025 at 2:45 PM