#11867: if spatialite is installed and pysqlite2.5 is installed without `enable_load_extension` tests won't run ---------------------------------+------------------------------------------ Reporter: danring | Owner: nobody Status: closed | Milestone: Component: GIS | Version: 1.1 Resolution: fixed | Keywords: enable_load_extension Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------+------------------------------------------ Changes (by jbronn):
* status: new => closed * needs_better_patch: => 0 * resolution: => fixed * needs_tests: => 0 * needs_docs: => 0 Comment: This was fixed in trunk when multi-db was merged in. In order to support multiple databases, the spatial backends became full-fledged Django database backends. An example configuration: {{{ DATABASES = { 'default' : { 'ENGINE' : 'django.contrib.gis.db.backends.spatialite', 'NAME' : 'geodjango.db', } } }}} Thus, your request for a `spatialite` backend was fulfilled. If still using the old `DATABASE_*` settings, then `DATABASE_ENGINE='sqlite3'` may still be used but `'django.contrib.gis'` must also be in your `INSTALLED_APPS` to enable backwards-compatibility. Also trunk now has better error-handling in absence of `enable_load_extension`. Specifically, the `spatialite` backend, upon initialization, now explicitly checks for support and raises a clear error on what went wrong: {{{ #!python # Enabling extension loading on the SQLite connection. try: self.connection.enable_load_extension(True) except AttributeError: raise 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.' ) }}} (from [browser:django/trunk/django/contrib/gis/db/backends/spatialite/base.py]) -- Ticket URL: <http://code.djangoproject.com/ticket/11867#comment:1> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.