The Django docs give an example of querying an ArrayField
with some really powerful lookups. But what if we inherited a project, and the prior developer didn’t know about this Postgres-specific field type? Let’s explore how we can still take advantage of the power of ArrayField
.
Django 4.1 quietly added a really powerful feature to the bulk_create
queryset method that effectively turns it into bulk_update_or_create
.
In this post, I explain how to add dynamic data to the choices shown in a Django form dropdown.