def includeme(config):  # pragma: no cover
    LOGGER.info("Load agreementCore plugin")
    add_design()
    config.registry.agreements_types = {}
    config.add_route_predicate("agreementType", IsAgreement)
    config.add_directive("add_agreement_type", register_agreement_type)
    config.add_request_method(extract_agreement, "agreement", reify=True)
    config.add_request_method(agreement_from_data)
    config.registry.registerAdapter(BaseAgreementConfigurator,
                                    (IAgreement, IRequest),
                                    IContentConfigurator)

    config.scan("openprocurement.agreement.core.views")
    ZcmlFile(
        os.path.join(os.path.dirname(os.path.abspath(__file__)),
                     "configure.zcml"),
        package=openprocurement.agreement.core,
    )
    # search for plugins
    settings = config.get_settings()
    plugins = settings.get("plugins") and settings["plugins"].split(",")
    for entry_point in iter_entry_points(
            "openprocurement.agreements.core.plugins"):
        if not plugins or entry_point.name in plugins:
            plugin = entry_point.load()
            plugin(config)
Beispiel #2
0
def includeme(config):
    config.add_tender_procurementMethodType(CloseFrameworkAgreementUA)
    config.scan("openprocurement.tender.cfaua.views")
    config.scan("openprocurement.tender.cfaua.subscribers")
    config.registry.registerAdapter(CloseFrameworkAgreementUAConfigurator,
                                    (ICloseFrameworkAgreementUA, IRequest),
                                    IContentConfigurator)
    ZcmlFile(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                          'configure.zcml'),
             package=openprocurement.tender.cfaua)
def includeme(config):
    config.add_tender_procurementMethodType(CFASelectionUATender)
    config.scan("openprocurement.tender.cfaselectionua.views")
    config.scan("openprocurement.tender.cfaselectionua.subscribers")
    config.registry.registerAdapter(TenderCfaSelectionUAConfigurator,
                                    (ICFASelectionUATender, IRequest),
                                    IContentConfigurator)
    ZcmlFile(os.path.join(os.path.dirname(os.path.abspath(__file__)),
                          'configure.zcml'),
             package=openprocurement.tender.cfaselectionua)
Beispiel #4
0
def includeme(config):
    LOGGER.info("Loading cfAgreementUA plugin")
    config.add_agreement_type(Agreement)
    config.registry.registerAdapter(
        CFAgreementUAConfigurator, (IClosedFrameworkAgreementUA, IRequest), IContentConfigurator
    )
    config.scan("openprocurement.agreement.cfaua.views")

    ZcmlFile(
        os.path.join(os.path.dirname(os.path.abspath(__file__)), "configure.zcml"),
        package=openprocurement.agreement.cfaua,
    )