| Blog | Adam Johnson |
|---|---|
| RSS 2.0 Feed | Adam Johnson |
| web | https://adamj.eu/ |
| Last Update | 02.15.2026 |
| Posts | 86 |
| Blog | Adam Johnson |
|---|---|
| RSS 2.0 Feed | Adam Johnson |
| web | https://adamj.eu/ |
| Last Update | 02.15.2026 |
| Posts | 86 |
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 MoreJan. 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 MoreDec. 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 MoreDec. 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 MoreNov. 25, 2025 » Adam Johnson » [Archived Version]
HTTP has a general authentication framework that defines a pattern into which various authentication schemes can fit. Clients may provide an authorization request header that contains a credential. If authorization is missing or invalid, the server may respond with a 401 (Unauthorized) status code, including a www-authenticate header advertising what …
Read MoreNov. 20, 2025 » Adam Johnson » [Archived Version]
Here are some Django-related deals for this year’s Black Friday (28th November) and Cyber Monday (1st December), including my own. I’ll keep this post up to date with any new deals I learn about. If you are also a creator, email me with details of your offer and …
Read MoreOct. 9, 2025 » Adam Johnson » [Archived Version]
HTTP supports response compression, which can significantly reduce the size of responses, thereby decreasing bandwidth usage and load times for users. It’s a cheap and valuable technique for improving website performance. Lighthouse, Google’s web performance auditing tool, recommends enabling compression where it is not enabled, presenting estimated bandwidth …
Read MoreSept. 21, 2025 » Adam Johnson » [Archived Version]
Django’s runserver automatically reloads when you change Python files. Without this autoreloading feature, you’d need to manually restart the server every time you made a code change. However, the default autoreloading implementation is inefficient, as it constantly polls the filesystem for changes. The alternative to polling is to …
Read MoreJuly 31, 2025 » Adam Johnson » [Archived Version]
Here’s a little tip based on some work that I did recently. The project has a URL pattern where the first part of the URL matches the current role the user is viewing the site as. Let’s say the roles are “chef”, “gourmand”, and “foodie”—example URLs might …
Read MoreJuly 29, 2025 » Adam Johnson » [Archived Version]
Within Django’s popular admin site, you can override ModelAdmin.get_queryset() to customize the queryset used by the admin views. It’s often used for performance optimizations, such as adding a select_related() call to batch-fetch related objects: from django.contrib import admin from example.models import Book @admin.register(Book …
Read More