Elsewhere
Release TIL Research Tool Museum Sighting Comment
Filters: Sorted by date
3,649 results
«« first
« previous
page 88 / 122
next »
last »»
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.
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.
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!
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.
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:
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.
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.
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
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.
TIL
Show the SQL schema for a PostgreSQL database
— This took me longer to figure out than I care to admit.
Release
datasette-graphql 1.4
— Datasette plugin providing an automatic GraphQL API for your SQLite databases
TIL
Using sphinx.ext.extlinks for issue links
— Datasette's [release notes](https://github.com/simonw/datasette/blob/main/docs/changelog.rst) are formatted using Sphinx. Almost every bullet point links to the corresponding GitHub issue, so they were full of lines that look like this:
TIL
Loading radio.garden into SQLite using jq
— http://radio.garden/ is an amazing website which displays a 3D globe covered in radio stations and lets you listen to any of them.
TIL
Using io.BufferedReader to peek against a non-peekable stream
— When building the [--sniff option](https://github.com/simonw/sqlite-utils/issues/230) for `sqlite-utils insert` (which attempts to detect the correct CSV delimiter and quote character by looking at the first 2048 bytes of a CSV file) I had the need to peek ahead in an incoming stream of data.
TIL
Handling CSV files with wide columns in Python
— Users [were reporting](https://github.com/simonw/sqlite-utils/issues/229) the following error using `sqlite-utils` to import some CSV files:
«« first
« previous
page 88 / 122
next »
last »»