def new(self, app_name, settings={}): """ Instantiates a new application context associated to a particular application (that must be owned by the organization this host is owned by). @param app_name: The name of the application. @type app_name: string @param settings: A dictionary describing the settings to add to this context (see L{this function's specification<add_settings>} for expected data model). @type settings: dict """ ctxt = self._new() ctxt.application = app_name add_settings(ctxt, settings) return ctxt
def new(self, app_name, settings = {}): """ Instantiates a new application context associated to a particular application (that must be owned by the organization this host is owned by). @param app_name: The name of the application. @type app_name: string @param settings: A dictionary describing the settings to add to this context (see L{this function's specification<add_settings>} for expected data model). @type settings: dict """ ctxt = self._new() ctxt.application = app_name add_settings(ctxt, settings) return ctxt