[OT] working with spatialite

14 views
Skip to first unread message

Manuele Pesenti

unread,
May 8, 2020, 10:56:31 AM5/8/20
to web...@googlegroups.com
Hi!

In order to work with spatialite I had to patch the Spatialite class in
this way in my model file (actually in py4web but the pydal is a common
project dependency):

from unittest import mock

...

# Before declaring first DAL instance

patcher = mock.patch('pydal.adapters.sqlite.Spatialite.SPATIALLIBS',
{"Linux": "mod_spatialite"})
patcher.start()

...

# At the end of the file after all table definitions

patcher.stop()

The problem is that is changed the name of the geometric extension in
sqlite3... Any other similar experience? Do you think it's a generic
solution to submit as an issue to the pydal project? Or does it depends
on my local package configuration?

Thanks a lot

    Manuele

Reply all
Reply to author
Forward
0 new messages