Simon Willison’s Weblog

Subscribe
Atom feed

Elsewhere

Filters: Sorted by date

Release django-sql-dashboard 0.3a0 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.2a2 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.2a1 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.2a0 — Django app for building dashboards using raw SQL queries
Release hacker-news-to-sqlite 0.4 — Create a SQLite database containing data pulled from Hacker News
Release django-sql-dashboard 0.1a3 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.1a2 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.1a — Django app for building dashboards using raw SQL queries
TIL Querying for items stored in UTC that were created on a Thursday in PST — This came up as [a question](https://news.ycombinator.com/item?id=26443148) on Hacker News. How can you query a SQLite database for items that were created on a Thursday in PST, when the data is stored in UTC?
None
TIL Querying for GitHub issues open for less than 60 seconds — While [writing this thread](https://twitter.com/simonw/status/1370390336514658310) about my habit of opening issues and closing them a few seconds later just so I could link to them in a commit message I decided to answer the question "How many of my issues were open for less than 60 seconds?"
None
TIL How to almost get facet counts in the Django admin — For a tantalizing moment today I thought I'd found a recipe for adding facet counts to the Django admin.
None
Release datasette-ripgrep 0.7 — Web interface for searching your code using ripgrep, built as a Datasette plugin
TIL Converting no-decimal-point latitudes and longitudes using jq — I had some data with weird co-ordinates in it:
None
TIL Flattening nested JSON objects with jq — I wanted to take a nested set of JSON objects and import them into a SQLite database using `sqlite-utils insert` - but I wanted to "flatten" some of the nested rows.
None
Release tableau-to-sqlite 0.2 — Fetch data from Tableau into a SQLite database
Release tableau-to-sqlite 0.1.1 — Fetch data from Tableau into a SQLite database
Release tableau-to-sqlite 0.1 — Fetch data from Tableau into a SQLite database
TIL Pretty-printing all read-only JSON in 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.
None
TIL How to run MediaWiki with SQLite on a macOS laptop — Today I [got curious](https://twitter.com/simonw/status/1368414296888070146) about how MediaWiki records page history, so I started digging around and in the process figured out how to run it against a SQLite database on my macOS laptop!
None
TIL Show the timezone for datetimes in the Django admin — 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.
None
TIL Writing tests for the Django admin with pytest-django — I'm using [pytest-django](https://pytest-django.readthedocs.io/) 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:
None
TIL Granting a PostgreSQL user read-only access to some tables — I wanted to grant a PostgreSQL user (or role) read-only access to a specific list of tables.
None
TIL Adding extra read-only information to a Django admin change page — I figured out this pattern today for adding templated extra blocks of information to the Django admin change page for an object.
None
Release flatten-single-item-arrays 0.1 — Given a JSON list of objects, flatten any keys which always contain single item arrays to just a single value
Release datasette-auth-github 0.13.1 — Datasette plugin that authenticates users against GitHub
Release datasette-block 0.1.1 — Block all access to specific path prefixes
Release datasette-block 0.1 — Block all access to specific path prefixes
Release github-contents 0.2 — Python class for reading and writing data to a GitHub repository
TIL Running tests against PostgreSQL in a service container — I wanted to run some Django tests - using `pytest-django` and with Django configured to pick up the `DATABASE_URL` environment variable via [dj-database-url](https://github.com/jacobian/dj-database-url) - against a PostgreSQL server running in GitHub Actions.
None
TIL Show the SQL schema for a PostgreSQL database — This took me longer to figure out than I care to admit.
None