Changeset - 3a02b678b5e7
[Not reviewed]
default
1 5 1
Mads Kiilerich (mads) - 6 years ago 2020-04-23 21:45:27
mads@kiilerich.com
Grafted from: d5761a249b74
tg: move make_app to kallithea/config/application.py per TG 2.4 convention
6 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
docs/overview.rst
Show inline comments
 
@@ -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
kallithea/bin/kallithea_cli_base.py
Show inline comments
 
@@ -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
kallithea/bin/kallithea_cli_db.py
Show inline comments
 
@@ -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:
kallithea/config/application.py
Show inline comments
 
file renamed from kallithea/config/middleware.py to kallithea/config/application.py
kallithea/lib/hooks.py
Show inline comments
 
@@ -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'):
setup.py
Show inline comments
 
@@ -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
 
    """,
 
)
0 comments (0 inline, 0 general)