Do not filter maps by center distance when running spatialite
This commit is contained in:
parent
bb1d8a96bb
commit
61ae371649
1 changed files with 4 additions and 1 deletions
|
@ -46,7 +46,10 @@ class Home(TemplateView, PaginatorMixin):
|
||||||
list_template_name = "leaflet_storage/map_list.html"
|
list_template_name = "leaflet_storage/map_list.html"
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
qs = Map.public.filter(center__distance_gt=(DEFAULT_CENTER, D(km=1)))
|
qs = Map.public
|
||||||
|
if settings.DATABASES['default']['ENGINE'] != 'django.db.backends.sqlite3':
|
||||||
|
# Unsupported query type for sqlite.
|
||||||
|
qs = qs.filter(center__distance_gt=(DEFAULT_CENTER, D(km=1)))
|
||||||
demo_map = None
|
demo_map = None
|
||||||
if hasattr(settings, "UMAP_DEMO_PK"):
|
if hasattr(settings, "UMAP_DEMO_PK"):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue