Feed: Adam Johnson

Blog Adam Johnson
RSS 2.0 Feed Adam Johnson
web https://adamj.eu/
Last Update11.14.2026
Posts94

Django: introducing django-msgspec

Aug. 7, 2026 » Adam Johnson » [Archived Version]

It’s another day, another new package day here. Say hello to django-msgspec, a package of drop-in replacements for Django and Django REST Framework (DRF) components backed by msgspec. msgspec is a C-based serialization library covering JSON, MessagePack, YAML, and TOML, with optional schema validation through typed Struct classes. Its …

Read More

Django: release code words up to 6.1

July 23, 2026 » Adam Johnson » [Archived Version]

Did you know that each Django release has a “code word” associated with it? It’s hidden in plain sight, in the announcement blog post describing the list of features coming in the next version. I think this is a lovely little tradition. I last covered the list back in …

Read More

Django: introducing django-crawl

July 21, 2026 » Adam Johnson » [Archived Version]

I recently migrated one of my client projects from the legacy django-csp package to Django 6.0’s built-in Content Security Policy (CSP) support (release note). This security header is a powerful tool for preventing unwanted content from being loaded on your site, so configuration correctness is paramount. The migration …

Read More

Django: introducing django-orjson

July 14, 2026 » Adam Johnson » [Archived Version]

Just as cars painted red are known to be faster, libraries implemented in Rust are also known to be faster. Today’s example is orjson, a Rusty replacement for Python’s built-in json module, boasting 10x faster serialization and 2x faster deserialization. Such a library is great, but adopting it …

Read More

Django: introducing django-integrity-policy

May 30, 2026 » Adam Johnson » [Archived Version]

Back in January, Firefox’s Security & Privacy Newsletter for 2025 Q4 piqued my interest with this mention: Integrity-Policy: Firefox 145 has added support for the Integrity-Policy response header. The header allows websites to ensure that only scripts with an integrity attribute will load. A new security header! That’s right …

Read More

Django: fixing a memory “leak” from Python 3.14’s incremental garbage collection

April 19, 2026 » Adam Johnson » [Archived Version]

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 …

Read More

Django: profile memory usage with Memray

Jan. 29, 2026 » Adam Johnson » [Archived Version]

Memory usage can be hard to keep under control in Python projects. The language doesn’t make it explicit where memory is allocated, module imports can have signficant costs, and it’s all too easy to create a global data structure that accidentally grows unbounded, leaking memory. Django projects can …

Read More

Django Quiz 2025

Jan. 3, 2026 » Adam Johnson » [Archived Version]

Last month, I held another quiz at the December edition of Django London. The December quiz is an annual tradition at our meetup, a way of making this final event of the year more relaxed and giving away some nice prizes. This was the seventh quiz that I’ve presented …

Read More

Django: implement HTTP basic authentication

Dec. 8, 2025 » Adam Johnson » [Archived Version]

Previously, we covered bearer authentication within HTTP’s general authentication framework. In this post, we’ll implement basic authentication, where the client provides a username and password. To recap, HTTP’s general authentication framework defines a general scheme for authentication: Clients may provide an authorization request header that contains a …

Read More

Django: what’s new in 6.0

Dec. 3, 2025 » Adam Johnson » [Archived Version]

Django 6.0 was released today, starting another release cycle for the loved and long-lived Python web framework (now 20 years old!). It comes with a mosaic of new features, contributed to by many, some of which I am happy to have helped with. Below is my pick of highlights …

Read More