I want to filter results according to their distance so I used GeoDjango and added a field PointField
to my model:
from django.contrib.gis.db import models
location = models.PointField(u"longitude/latitude",
geography=True,
blank=True,
null=True)
However, I have this error in my browser when trying to launch the index (my web site)
ImproperlyConfigured at /
The pysqlite library does not support C extension loading. Both SQLite and pysqlite must be configured to allow the loading of extensions to use SpatiaLite.
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.10.6
Exception Type: ImproperlyConfigured
Exception Value:
The pysqlite library does not support C extension loading. Both SQLite and pysqlite must be configured to allow the loading of extensions to use SpatiaLite.
Exception Location: /Users/mac/ostadienv/lib/python3.5/site packages/django/contrib/gis/db/backends/spatialite/base.py in get_new_connection, line 52
Python Executable: /Users/mac/ostadienv/bin/python
Python Version: 3.5.0
and this in python:
'The pysqlite library does not support C extension loading. '
django.core.exceptions.ImproperlyConfigured: The pysqlite library does not support C extension loading. Both SQLite and pysqlite must be configured to allow the loading of extensions to use SpatiaLite.
I'm working on a MAC.