diff options
Diffstat (limited to 'chimere/views.py')
-rw-r--r-- | chimere/views.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chimere/views.py b/chimere/views.py index 7a1ff66..0a4c1f9 100644 --- a/chimere/views.py +++ b/chimere/views.py @@ -213,8 +213,8 @@ def index(request, area_name=None, default_area=None, simple=False, 'dynamic_categories': response_dct['dynamic_categories'], 'zoomout': zoomout, 'has_default_area': Area.objects.filter(default=True).count(), - 'has_search': hasattr(settings, 'CHIMERE_SEARCH_ENGINE') and - settings.CHIMERE_SEARCH_ENGINE + 'has_search': response_dct['area'].use_search if response_dct['area'] + else None, }) if hasattr(settings, 'PROJECT_IMAGE') and settings.PROJECT_IMAGE: response_dct['PROJECT_IMAGE'] = settings.PROJECT_IMAGE @@ -1272,8 +1272,8 @@ def property_choice_list(request, area_name='', property_slug=''): SearchView = None autocomplete = None -if hasattr(settings, 'CHIMERE_SEARCH_ENGINE') \ - and settings.CHIMERE_SEARCH_ENGINE: + +if getattr(settings, 'HAYSTACK_SEARCH_ENGINE', None): from haystack.views import SearchView as HaystackSearchView from haystack.query import SearchQuerySet @@ -1301,3 +1301,6 @@ if hasattr(settings, 'CHIMERE_SEARCH_ENGINE') \ 'spelling': spelling, }) return HttpResponse(the_data, content_type='application/json') +else: + # TODO SEARCH + pass |