django-planet

Adam Johnson

Blog Info Adam Johnson
Blog website Link

Django Settings Patterns to Avoid

Nov. 24, 2022 » Adam Johnson » [Archived Version]

This post is an adapted extract from my book Boost Your Django DX, available now. Here are some potential mistakes made with Django settings that you can avoid. Don’t Read Settings at Import Time Python doesn’t make a distinction between import time and run time. As such, it …

Read More

Django Settings Patterns to Avoid

Nov. 24, 2022 » Adam Johnson » [Archived Version]

This post is an adapted extract from my book Boost Your Django DX, available now. Here are some potential mistakes made with Django settings that you can avoid. Don’t Read Settings at Import Time Python doesn’t make a distinction between import time and run time. As such, it …

Read More

Django-related Deals for Black Friday and Cyber Monday 2022

Nov. 21, 2022 » Adam Johnson » [Archived Version]

Here are some Django-related deals for this year’s Black Friday (25th Nov) and Cyber Monday (28th Nov), including my own. For more deals on general Python-related products, see Trey Hunner’s post. My books My two books, Boost Your Django DX and Speed Up Your Django Tests, have 50 …

Read More

Django-related Deals for Black Friday and Cyber Monday 2022

Nov. 21, 2022 » Adam Johnson » [Archived Version]

Here are some Django-related deals for this year’s Black Friday (25th Nov) and Cyber Monday (28th Nov), including my own. For more deals on general Python-related products, see Trey Hunner’s post. My books My two books, Boost Your Django DX and Speed Up Your Django Tests, have 50 …

Read More

unittest’s new context methods in Python 3.11 (with backports)

Nov. 14, 2022 » Adam Johnson » [Archived Version]

Python 3.11 only made one change to unittest, but it’s a good one: context manager methods. These methods can simplify setup and teardown logic in many cases, such as dynamic use of unittest.mock. In this post we’ll look at a couple fo examples using the new …

Read More

unittest’s new context methods in Python 3.11 (with backports)

Nov. 14, 2022 » Adam Johnson » [Archived Version]

Python 3.11 only made one change to unittest, but it’s a good one: context manager methods. These methods can simplify setup and teardown logic in many cases, such as dynamic use of unittest.mock. In this post we’ll look at a couple fo examples using the new …

Read More

django-upgrade Mega Release 1.11.0

Oct. 25, 2022 » Adam Johnson » [Archived Version]

I just released version 1.11.0 of django-upgrade, a tool for automatically upgrading your Django project code. This release contains a lot of new features and fixes, thanks to new contributors including those at the Djangocon Europe sprints. Let’s look at the top changes. New admin.site.register …

Read More

django-upgrade Mega Release 1.11.0

Oct. 25, 2022 » Adam Johnson » [Archived Version]

I just released version 1.11.0 of django-upgrade, a tool for automatically upgrading your Django project code. This release contains a lot of new features and fixes, thanks to new contributors including those at the Djangocon Europe sprints. Let’s look at the top changes. New admin.site.register …

Read More

Migrate PostgreSQL ID’s from serial to identity after upgrading to Django 4.1

Oct. 20, 2022 » Adam Johnson » [Archived Version]

The Django 4.1 release notes feature this short, innocent-looking note: On PostgreSQL, AutoField, BigAutoField, and SmallAutoField are now created as identity columns rather than serial columns with sequences. In this post, we’ll expand on what this means, why you might want to update existing columns from serial types …

Read More

Migrate PostgreSQL ID’s from serial to identity after upgrading to Django 4.1

Oct. 20, 2022 » Adam Johnson » [Archived Version]

The Django 4.1 release notes feature this short, innocent-looking note: On PostgreSQL, AutoField, BigAutoField, and SmallAutoField are now created as identity columns rather than serial columns with sequences. In this post, we’ll expand on what this means, why you might want to update existing columns from serial types …

Read More