Initial registry updates for the dynamic search app
This commit is contained in:
@@ -14,7 +14,6 @@ from signaler.signals import post_update_index, pre_update_index
|
||||
from lock_manager import Lock, LockError
|
||||
|
||||
from .models import IndexableObject
|
||||
from .conf.settings import INDEX_UPDATE_INTERVAL
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -63,3 +62,5 @@ bind_links(['results'], [search_again], menu_name='sidebar')
|
||||
dynamic_search_scheduler = LocalScheduler('search', _(u'Search'))
|
||||
dynamic_search_scheduler.add_interval_job('search_index_update', _(u'Update the search index with the most recent modified documents.'), search_index_update, seconds=INDEX_UPDATE_INTERVAL)
|
||||
dynamic_search_scheduler.start()
|
||||
|
||||
# register_top_menu('search', link=Link(text=_(u'search'), view='search', sprite='zoom', children_url_regex=[r'^search/']))
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
"""Configuration options for the dynamic_search app"""
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from smart_settings.api import Setting, SettingNamespace
|
||||
|
||||
namespace = SettingNamespace('dynamic_search', _(u'Searching'), module='dynamic_search.conf.settings', sprite='zoom')
|
||||
|
||||
Setting(
|
||||
namespace=namespace,
|
||||
name='RECENT_COUNT',
|
||||
global_name='SEARCH_RECENT_COUNT',
|
||||
default=5,
|
||||
description=_(u'Maximum number of search queries to remember per user.')
|
||||
)
|
||||
|
||||
Setting(
|
||||
namespace=namespace,
|
||||
name='INDEX_UPDATE_INTERVAL',
|
||||
global_name='SEARCH_INDEX_UPDATE_INTERVAL',
|
||||
default=1800,
|
||||
description=_(u'Interval in second on which to trigger the search index update.')
|
||||
)
|
||||
25
apps/dynamic_search/registry.py
Normal file
25
apps/dynamic_search/registry.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
#from .icons import icon_history_list
|
||||
#from .links import history_list
|
||||
|
||||
label = _(u'Search')
|
||||
#description = _(u'Handles the events registration and event logging.')
|
||||
dependencies = ['app_registry', 'icons', 'navigation']
|
||||
#icon = icon_history_list
|
||||
#tool_links = [history_list]
|
||||
#- namespace=namespace,
|
||||
#- name='RECENT_COUNT',
|
||||
#- global_name='SEARCH_RECENT_COUNT',
|
||||
#- default=5,
|
||||
#- description=_(u'Maximum number of search queries to remember per user.')
|
||||
#-)
|
||||
#-
|
||||
#-Setting(
|
||||
#- namespace=namespace,
|
||||
#- name='INDEX_UPDATE_INTERVAL',
|
||||
#- global_name='SEARCH_INDEX_UPDATE_INTERVAL',
|
||||
#- default=1800,
|
||||
#- description=_(u'Interval in second on which to trigger the search index update.')
|
||||
Reference in New Issue
Block a user