Skip to content

Commit

Permalink
Resolves GeoNode#6925: add deprecation warning for old thesaurus sett…
Browse files Browse the repository at this point in the history
…ings
  • Loading branch information
mattiagiupponi committed Feb 4, 2021
1 parent 1794c89 commit 437623f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions geonode/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#
#########################################################################

import warnings
from django.conf import settings
from geonode import get_version
from geonode.catalogue import default_catalogue_backend
Expand All @@ -31,6 +32,11 @@ def resource_urls(request):
"""Global values to pass to templates"""
site = Site.objects.get_current()
thesaurus = Thesaurus.objects.all().exists()
if hasattr(settings, 'THESAURUS'):
warnings.warn(
'Thesaurus settings is going to be'
'deprecated in the future versions, please move the settings to '
'the new configuration ', FutureWarning)
defaults = dict(
STATIC_URL=settings.STATIC_URL,
CATALOGUE_BASE_URL=default_catalogue_backend()['URL'],
Expand Down

0 comments on commit 437623f

Please sign in to comment.