Understanding Kotti’s startup phase¶
When a Kotti application is started the
kotti.main()function is called by the WSGI server and is passed a
settingsdictionary that contains all key / value pairs from the
[app:kotti]section of the
settingsdictionary is passed to
kotti.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 the
settingsdictionary, 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 the
settingsdictionary for later processing, i.e. after
A class:pyramid.config.Configurator is instanciated with the remaining
kotti.base_includes(containing various Kotti subsystems, such as
kotti.views, etc.) are passed to
pyramid.includesthat were removed from the
settingsdictionary in step 2.3 are processed.
The SQLAlchemy engine is created with the connection URL that is defined in the sqlalchemy.url parameter in the
The fully configured WSGI application is returned to the WSGI server and is ready to process requests.