Commit a1db3ea8 by Clinton Blackburn Committed by GitHub

Merge pull request #292 from edx/clintonb/query-optimization

Query Optimizations
parents 386bd8c5 97c7c193
......@@ -348,6 +348,9 @@ SWAGGER_SETTINGS = {
'permission_denied_handler': 'course_discovery.apps.api.views.api_docs_permission_denied_handler'
}
# Haystack configuration (http://django-haystack.readthedocs.io/en/v2.5.0/settings.html)
HAYSTACK_ITERATOR_LOAD_PER_QUERY = 200
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'course_discovery.apps.edx_haystack_extensions.backends.EdxElasticsearchSearchEngine',
......@@ -366,3 +369,7 @@ SITE_ID = 1
COMMENTS_APP = 'course_discovery.apps.publisher_comments'
TAGGIT_CASE_INSENSITIVE = True
# django-solo configuration (https://github.com/lazybird/django-solo#settings)
SOLO_CACHE = 'default'
SOLO_CACHE_TIMEOUT = 3600
from course_discovery.settings.production import *
from course_discovery.settings.shared.debug_toolbar import *
DEBUG = True
......@@ -7,19 +8,6 @@ LOGGING['handlers']['local'] = {
'class': 'logging.NullHandler',
}
# TOOLBAR CONFIGURATION
# See: http://django-debug-toolbar.readthedocs.org/en/latest/installation.html
if os.environ.get('ENABLE_DJANGO_TOOLBAR', False):
INSTALLED_APPS += [
'debug_toolbar',
]
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
DEBUG_TOOLBAR_PATCH_SETTINGS = False
INTERNAL_IPS = ('127.0.0.1',)
# END TOOLBAR CONFIGURATION
......
from course_discovery.settings.base import *
from course_discovery.settings.shared.debug_toolbar import *
DEBUG = True
......@@ -30,24 +31,6 @@ DATABASES = {
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# END EMAIL CONFIGURATION
# TOOLBAR CONFIGURATION
# See: http://django-debug-toolbar.readthedocs.org/en/latest/installation.html
if os.environ.get('ENABLE_DJANGO_TOOLBAR', False):
INSTALLED_APPS += [
'debug_toolbar',
'elastic_panel',
]
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
DEBUG_TOOLBAR_PATCH_SETTINGS = False
DEBUG_TOOLBAR_PANELS = [
'elastic_panel.panel.ElasticDebugPanel'
]
INTERNAL_IPS = ('127.0.0.1',)
# END TOOLBAR CONFIGURATION
......
"""
Django Debug Toolbar settings.
http://django-debug-toolbar.readthedocs.org/en/latest/installation.html
"""
from course_discovery.settings.base import *
if os.environ.get('ENABLE_DJANGO_TOOLBAR', False):
INSTALLED_APPS += [
'debug_toolbar',
'elastic_panel',
]
MIDDLEWARE_CLASSES += (
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
DEBUG_TOOLBAR_PATCH_SETTINGS = False
DEBUG_TOOLBAR_PANELS = [
'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
'elastic_panel.panel.ElasticDebugPanel'
]
......@@ -49,3 +49,5 @@ DEFAULT_PARTNER_ID = 1
# Enable offline compression of CSS/JS
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True
SOLO_CACHE = None
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment