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)))