Configuration: new setting UMAP_EXCLUDE_DEFAULT_MAPS
- This setting will exclude default maps (maps where the default center has not been updated) - until now, the default was to exclude default maps - new default: not exclude
This commit is contained in:
parent
ca36ecfc10
commit
d783366d9d
3 changed files with 9 additions and 2 deletions
|
@ -147,6 +147,7 @@ LEAFLET_STORAGE_EXTRA_URLS = {
|
|||
}
|
||||
SITE_URL = "http://umap.org"
|
||||
UMAP_DEMO_SITE = False
|
||||
UMAP_EXCLUDE_DEFAULT_MAPS = False
|
||||
MAP_SHORT_URL_NAME = "umap_short_url"
|
||||
UMAP_USE_UNACCENT = False
|
||||
UMAP_FEEDBACK_LINK = "http://wiki.openstreetmap.org/wiki/UMap#Feedback_and_help" # noqa
|
||||
|
|
|
@ -64,6 +64,11 @@ SOCIAL_AUTH_BACKEND_ERROR_URL = "/"
|
|||
# UMAP_SHOWCASE_PK = 1156
|
||||
LEAFLET_STORAGE_ALLOW_ANONYMOUS = True
|
||||
UMAP_DEMO_SITE = True
|
||||
|
||||
# This setting will exclude empty maps (in fact, it will exclude all maps where
|
||||
# the default center has not been updated)
|
||||
UMAP_EXCLUDE_DEFAULT_MAPS = False
|
||||
|
||||
SITE_URL = "http://localhost:8019"
|
||||
SHORT_SITE_URL = "http://s.hort"
|
||||
|
||||
|
|
|
@ -54,8 +54,9 @@ class Home(TemplateView, PaginatorMixin):
|
|||
|
||||
def get_context_data(self, **kwargs):
|
||||
qs = Map.public
|
||||
if 'spatialite' not in settings.DATABASES['default']['ENGINE']:
|
||||
# Unsupported query type for sqlite.
|
||||
if (settings.UMAP_EXCLUDE_DEFAULT_MAPS and
|
||||
'spatialite' not in settings.DATABASES['default']['ENGINE']):
|
||||
# Unsupported query type for sqlite.
|
||||
qs = qs.filter(center__distance_gt=(DEFAULT_CENTER, D(km=1)))
|
||||
demo_map = None
|
||||
if hasattr(settings, "UMAP_DEMO_PK"):
|
||||
|
|
Loading…
Reference in a new issue