--load-extension=spatialite shortcut, closes #1028

This commit is contained in:
Simon Willison 2020-10-19 15:37:31 -07:00
commit 6aa5886379
6 changed files with 54 additions and 6 deletions

View file

@ -170,7 +170,7 @@ module, use the following command::
docker run -p 8001:8001 -v `pwd`:/mnt \
datasetteproject/datasette \
datasette -p 8001 -h 0.0.0.0 /mnt/fixtures.db \
--load-extension=/usr/local/lib/mod_spatialite.so
--load-extension=spatialite
You can confirm that SpatiaLite is successfully loaded by visiting
http://127.0.0.1:8001/-/versions

View file

@ -8,6 +8,14 @@ The `SpatiaLite module <https://www.gaia-gis.it/fossil/libspatialite/index>`_ fo
To use it with Datasette, you need to install the ``mod_spatialite`` dynamic library. This can then be loaded into Datasette using the ``--load-extension`` command-line option.
Datasette can look for SpatiaLite in common installation locations if you run it like this::
datasette --load-extension=spatialite
If SpatiaLite is in another location, use the full path to the extension instead::
datasette --load-extension=/usr/local/lib/mod_spatialite.dylib
Installation
============
@ -25,7 +33,7 @@ This will install the ``spatialite`` command-line tool and the ``mod_spatialite`
You can now run Datasette like so::
datasette --load-extension=/usr/local/lib/mod_spatialite.dylib
datasette --load-extension=spatialite
Installing SpatiaLite on Linux
------------------------------