OpenAI's DevDay event yesterday (October 1st 2024) didn’t invite press (as far as I can tell), didn’t livestream the event and didn’t allow audience livestreaming either. I made a last minute decision to live blog the event myself. …
I published a reusable Django application today: django-http-debug, which lets you define mock HTTP endpoints using the Django admin - like /webhook-debug/
for example, configure what they should return and view detailed logs of every request they receive. …
We launched the Datasette Cloud blog today. The Datasette Cloud site itself is a Django app - it uses Django and PostgreSQL to manage accounts, teams and soon billing and payments, then launches dedicated containers running Datasette for each customer. …
Datasette is implemented as an ASGI application. …
Jeff Triplett convinced me to take a look at just as a command automation tool - sort of an alternative to Make, except with a focus on commands rather than managing build dependencies. …
I figured out how to use a PostgreSQL CTE as part of an update statement in a Django data migration. The trick here is mainly understanding how to combine CTEs with a PostgreSQL update - here's the pattern for that: …
I tried using a gin index to speed up LIKE '%term%'
queries against a column. …
migrations.RunSQL.noop
provides an easy way to create "reversible" Django SQL migrations, where the reverse operation does nothing (but keeps it possible to reverse back to a previous migration state without being blocked by an irreversible migration). …
I wanted to add an action option to the Django Admin for exporting the currently selected set of rows (or every row in the table) as a CSV file. …
I have a text column which contains comma-separated values - inherited from an older database schema. …
I got a complaint from a Windows-with-mouse user of a Django admin project I'm working on: they couldn't see the right hand columns in a table without scrolling horizontally, but since the horizontal scrollbar was only available at the bottom of the page they had to scroll all the way to the bottom first in order to scroll sideways. …
The PostgreSQL fuzzystrmatch extension enables several functions for fuzzy string matching: soundex()
, difference()
, levenshtein()
, levenshtein_less_equal()
, metaphone()
, dmetaphone()
and dmetaphone_alt()
. …
I needed to bulk-delete a large number of objects today. Django deletions are relatively inefficient by default, because Django implements its own version of cascading deletions and fires signals for each deleted object. …
For a tantalizing moment today I thought I'd found a recipe for adding facet counts to the Django admin. …
I have a bunch of models with JSON fields that are marked as read-only in the Django admin - usually because they're recording the raw JSON that was imported from an API somewhere to create an object, for debugging purposes. …
Django supports storing dates in a database as UTC but displaying them in some other timezone - which is good. But... by default datetimes are shown in the Django admin interface without any clue as to what timezone they are being displayed in. …
I'm using pytest-django on a project and I wanted to write a test for a Django admin create form submission. Here's the pattern I came up with: …
I figured out this pattern today for adding templated extra blocks of information to the Django admin change page for an object. …
Django 3.1 introduces PostgreSQL search_type="websearch"
- which gives you search with advanced operators like "phrase search" -excluding
. James Turk wrote about this here, and it's also in my weeknotes. …