From a86d29dd0ef8bb156e0b310504d57f1f2a54a56b Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 9 Sep 2014 19:13:11 +0200 Subject: [PATCH] The string to check on is actually spatialite, not sqlite --- umap/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/umap/views.py b/umap/views.py index 80d71ceb..2a7b33a3 100644 --- a/umap/views.py +++ b/umap/views.py @@ -47,7 +47,7 @@ class Home(TemplateView, PaginatorMixin): def get_context_data(self, **kwargs): qs = Map.public - if settings.DATABASES['default']['ENGINE'] != 'django.db.backends.sqlite3': + if not 'spatialite' in settings.DATABASES['default']['ENGINE']: # Unsupported query type for sqlite. qs = qs.filter(center__distance_gt=(DEFAULT_CENTER, D(km=1))) demo_map = None