Simon Willison’s Weblog

Subscribe
Atom feed

Elsewhere

Filters: Sorted by date

TIL Enabling a gin index for faster LIKE queries — I tried using a gin index to speed up `LIKE '%term%'` queries against a column.
None
Release geojson-to-sqlite 0.3 — CLI tool for converting GeoJSON files to SQLite (with SpatiaLite)
Release django-sql-dashboard 0.14 — Django app for building dashboards using raw SQL queries
TIL Vega-Lite bar charts in the same order as the data — I've been puzzling over this one for a couple of years now, and I finally figured out the solution.
None
TIL The Wikipedia page stats API — Via https://alexgarcia.xyz/dataflow/examples/wiki-pageviews/ I found this API for retrieving daily pageview stats from Wikipedia for any article:
None
Release django-sql-dashboard 0.13 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.12.3 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.12.2 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.12.1 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.12 — Django app for building dashboards using raw SQL queries
TIL Scroll page to form if there are errors — For a Django application I'm working on ([this issue](https://github.com/simonw/django-sql-dashboard/issues/44)) I have a form that can be quite a long way down the page.
None
TIL Running Datasette on Replit — I figured out how to run Datasette on https://replit.com/
None
TIL migrations.RunSQL.noop for reversible SQL migrations — `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).
None
Release django-sql-dashboard 0.11a0 — Django app for building dashboards using raw SQL queries
TIL Django Admin action for exporting selected rows as CSV — 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.
None
Release django-sql-dashboard 0.10a1 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.10a0 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.9a1 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.9a0 — Django app for building dashboards using raw SQL queries
TIL Constructing GeoJSON in PostgreSQL — In order to efficiently generate a GeoJSON representation of a vast number of locations, I'm currently experimenting with generating the GeoJSON directly inside a PostgreSQL SQL query using `json_build_object()` and friends.
None
TIL Filter by comma-separated values in the Django admin — I have a text column which contains comma-separated values - inherited from an older database schema.
None
TIL Usable horizontal scrollbars in the Django admin for mouse users — 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.
None
TIL Enabling the fuzzystrmatch extension in PostgreSQL with a Django migration — The PostgreSQL [fuzzystrmatch extension](https://www.postgresql.org/docs/13/fuzzystrmatch.html) enables several functions for fuzzy string matching: `soundex()`, `difference()`, `levenshtein()`, `levenshtein_less_equal()`, `metaphone()`, `dmetaphone()` and `dmetaphone_alt()`.
None
TIL Listing files uploaded to Cloud Build — Today while running `datasette publish cloudrun ...` I noticed the following:
None
Release django-sql-dashboard 0.8a2 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.8a1 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.8a0 — Django app for building dashboards using raw SQL queries
TIL Using json_extract_path in PostgreSQL — The `json_extract_path()` function in PostgreSQL can be used to extract specific items from JSON - but I couldn't find documentation for the path language it uses.
None
Release django-sql-dashboard 0.7a0 — Django app for building dashboards using raw SQL queries
Release json-post 0.2 — Tool for posting JSON to an API, broken into pages