CSRF_FAILURE_VIEW = 'desktop.views.csrf_failure' ############################################################ # Part 4: Installation of apps ############################################################ _config_dir = os.getenv("HUE_CONF_DIR", get_desktop_root("conf")) # Libraries are loaded and configured before the apps appmanager.load_libs() _lib_conf_modules = [dict(module=app.conf, config_key=None) for app in appmanager.DESKTOP_LIBS if app.conf is not None] LOCALE_PATHS.extend([app.locale_path for app in appmanager.DESKTOP_LIBS]) # Load desktop config _desktop_conf_modules = [dict(module=desktop.conf, config_key=None)] conf.initialize(_desktop_conf_modules, _config_dir) # Register the redaction filters into the root logger as soon as possible. desktop.redaction.register_log_filtering(desktop.conf.get_redaction_policy()) # Activate l10n # Install apps appmanager.load_apps(desktop.conf.APP_BLACKLIST.get()) for app in appmanager.DESKTOP_APPS: INSTALLED_APPS.extend(app.django_apps) LOCALE_PATHS.append(app.locale_path) logging.debug("Installed Django modules: %s" % ",".join(map(str, appmanager.DESKTOP_MODULES)))
# Part 4: Installation of apps ############################################################ _config_dir = os.getenv("HUE_CONF_DIR", get_desktop_root("conf")) # Libraries are loaded and configured before the apps appmanager.load_libs() _lib_conf_modules = [ dict(module=app.conf, config_key=None) for app in appmanager.DESKTOP_LIBS if app.conf is not None ] LOCALE_PATHS.extend([app.locale_path for app in appmanager.DESKTOP_LIBS]) # Load desktop config _desktop_conf_modules = [dict(module=desktop.conf, config_key=None)] conf.initialize(_desktop_conf_modules, _config_dir) # Register the redaction filters into the root logger as soon as possible. desktop.redaction.register_log_filtering(desktop.conf.get_redaction_policy()) # Activate l10n # Install apps appmanager.load_apps(desktop.conf.APP_BLACKLIST.get()) for app in appmanager.DESKTOP_APPS: INSTALLED_APPS.extend(app.django_apps) LOCALE_PATHS.append(app.locale_path) logging.debug("Installed Django modules: %s" % ",".join(map(str, appmanager.DESKTOP_MODULES))) # Load app configuration
# manage its own table with an appropriate foreign key. AUTH_PROFILE_MODULE=None LOGIN_REDIRECT_URL = "/" PYLINTRC = get_desktop_root('.pylintrc') ############################################################ # Part 4: Installation of apps ############################################################ # Libraries are loaded and configured before the apps appmanager.load_libs() _lib_conf_modules = filter(None, [app.conf for app in appmanager.DESKTOP_LIBS]) conf.initialize(_lib_conf_modules) appmanager.load_apps() for app in appmanager.DESKTOP_APPS: INSTALLED_APPS.extend(app.django_apps) logging.debug("Installed Django modules: %s" % ",".join(map(str, appmanager.DESKTOP_MODULES))) # Load app configuration _app_conf_modules = filter(None, [app.conf for app in appmanager.DESKTOP_APPS]) _app_conf_modules.append(desktop.conf) conf.initialize(_app_conf_modules) # Now that we've loaded the desktop conf, set the django DEBUG mode based on the conf. DEBUG = desktop.conf.DJANGO_DEBUG_MODE.get() TEMPLATE_DEBUG = DEBUG