Understanding Kotti’s startup phase¶
- When a Kotti application is started the
kotti.main()function is called by the WSGI server and is passed asettingsdictionary that contains all key / value pairs from the[app:kotti]section of the*.inifile. - The
settingsdictionary is passed tokotti.base_configure(). This is where the main work happens:- Every key in kotti.conf_defaults that is not in the
settingsdictionary (i.e. that is not in the.inifile) is copied to thesettingsdictionary, together with the default value for that key. - Add-on initializations: all functions that are listed in the
kotti.configuratorsparameter are resolved and called. pyramid.includesare removed from thesettingsdictionary for later processing, i.e. afterkotti.base_includes.- A class:pyramid.config.Configurator is instanciated with the remaining
settings. - The
kotti.base_includes(containing various Kotti subsystems, such askotti.events,kotti.views, etc.) are passed toconfig.include. - The
pyramid.includesthat were removed from thesettingsdictionary in step 2.3 are processed. - The
kotti.zcml_includesare processed.
- Every key in kotti.conf_defaults that is not in the
- The SQLAlchemy engine is created with the connection URL that is defined
in the sqlalchemy.url parameter in the
.inifile. - The fully configured WSGI application is returned to the WSGI server and is ready to process requests.