diff --git a/docs/overview.rst b/docs/overview.rst --- a/docs/overview.rst +++ b/docs/overview.rst @@ -172,7 +172,7 @@ There are several web server options: The web server used by ``gearbox`` is configured in the ``.ini`` file passed to it. The entry point for the WSGI application is configured - in ``setup.py`` as ``kallithea.config.middleware:make_app``. + in ``setup.py`` as ``kallithea.config.application:make_app``. - `Apache httpd`_ can serve WSGI applications directly using mod_wsgi_ and a simple Python file with the necessary configuration. This is a good option if diff --git a/kallithea/bin/kallithea_cli_base.py b/kallithea/bin/kallithea_cli_base.py --- a/kallithea/bin/kallithea_cli_base.py +++ b/kallithea/bin/kallithea_cli_base.py @@ -23,7 +23,7 @@ import click import paste.deploy import kallithea -import kallithea.config.middleware +import kallithea.config.application # kallithea_cli is usually invoked through the 'kallithea-cli' wrapper script @@ -77,7 +77,7 @@ def register_command(config_file=False, logging.config.fileConfig(cp, {'__file__': path_to_ini_file, 'here': os.path.dirname(path_to_ini_file)}) if config_file_initialize_app: - kallithea.config.middleware.make_app(kallithea.CONFIG.global_conf, **kallithea.CONFIG.local_conf) + kallithea.config.application.make_app(kallithea.CONFIG.global_conf, **kallithea.CONFIG.local_conf) return annotated(*args, **kwargs) return cli_command(runtime_wrapper) return annotator diff --git a/kallithea/bin/kallithea_cli_db.py b/kallithea/bin/kallithea_cli_db.py --- a/kallithea/bin/kallithea_cli_db.py +++ b/kallithea/bin/kallithea_cli_db.py @@ -67,7 +67,7 @@ def db_create(user, password, email, rep Session().commit() # initial repository scan - kallithea.config.middleware.make_app( + kallithea.config.application.make_app( kallithea.CONFIG.global_conf, **kallithea.CONFIG.local_conf) added, _ = kallithea.lib.utils.repo2db_mapper(kallithea.model.scm.ScmModel().repo_scan()) if added: diff --git a/kallithea/config/middleware.py b/kallithea/config/application.py rename from kallithea/config/middleware.py rename to kallithea/config/application.py diff --git a/kallithea/lib/hooks.py b/kallithea/lib/hooks.py --- a/kallithea/lib/hooks.py +++ b/kallithea/lib/hooks.py @@ -307,14 +307,14 @@ def _hook_environment(repo_path): connect to the database. """ import paste.deploy - import kallithea.config.middleware + import kallithea.config.application extras = get_hook_environment() path_to_ini_file = extras['config'] kallithea.CONFIG = paste.deploy.appconfig('config:' + path_to_ini_file) #logging.config.fileConfig(ini_file_path) # Note: we are in a different process - don't use configured logging - kallithea.config.middleware.make_app(kallithea.CONFIG.global_conf, **kallithea.CONFIG.local_conf) + kallithea.config.application.make_app(kallithea.CONFIG.global_conf, **kallithea.CONFIG.local_conf) # fix if it's not a bare repo if repo_path.endswith(os.sep + '.git'): diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -156,6 +156,6 @@ setuptools.setup( kallithea-cli = kallithea.bin.kallithea_cli:cli [paste.app_factory] - main = kallithea.config.middleware:make_app + main = kallithea.config.application:make_app """, )