The string to check on is actually spatialite, not sqlite

This commit is contained in:
Yohan Boniface 2014-09-09 19:13:11 +02:00
parent 61ae371649
commit a86d29dd0e

View file

@ -47,7 +47,7 @@ class Home(TemplateView, PaginatorMixin):
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
qs = Map.public 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. # Unsupported query type for sqlite.
qs = qs.filter(center__distance_gt=(DEFAULT_CENTER, D(km=1))) qs = qs.filter(center__distance_gt=(DEFAULT_CENTER, D(km=1)))
demo_map = None demo_map = None