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 its all() 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.

all()[source]

Check settings and create registry objects.

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.add_routes_agent(config)[source]

Add agent routes and methods.

publiforge.initialize.add_routes_front(config)[source]

Add Web front routes.

publiforge.initialize.before_render(event)[source]

A subscriber for pyramid.events.BeforeRender events.

publiforge.initialize.new_request(event)[source]

A subscriber for pyramid.events.NewRequest events.

publiforge.initialize.perm_group_finder(login, request)[source]

Return permission groups of current user.

Parameters: