Initialization Reference¶
The __init__
Module¶
The main()
function is called when the pserve
command is invoked
against this application.
-
publiforge.
main
(global_config, **settings)[source]¶ This is the main function. It returns a Pyramid WSGI application.
Parameters: - global_config – (dictionary) Default section of INI file.
- settings – (dictionary) Application settings of [app:publiforge] section of INI file.
Returns: (object) WSGI application.
It creates an instance of
Initialize
class and call itsall()
method to initialize the application.
The initialize
Module¶
When you launch the PubliForge application, this module determines which
mode you are running: front, agent or both. According to this mode, it sets up
database, creates a instance of FrontBuildManager
class, an instance of HandlerManager
, an instance of
AgentBuildManager
class and makes required
directories.
-
class
publiforge.initialize.
Initialize
(global_config, configurator)[source]¶ Initialization application class.
-
publiforge.initialize.
perm_group_finder
(login, request)[source]¶ Return permission groups of current user.
Parameters: - login – (string) User login.
- request – (
pyramid.request.Request
instance) Current request.
-
class
publiforge.initialize.
RootFactory
(request)[source]¶ Return the traversal root of the application.
Its main role is to define Access Control List (ACL). See Permissions for a complete description of permissions.
-
publiforge.initialize.
new_request
(event)[source]¶ A subscriber for
pyramid.events.NewRequest
events.
-
publiforge.initialize.
before_render
(event)[source]¶ A subscriber for
pyramid.events.BeforeRender
events.