Exemple #1
0
def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    config = Configurator(
        root_factory=Root,
        settings=settings,
        locale_negotiator=locale_negotiator,
        authentication_policy=create_authentication(settings))

    config.include("c2cgeoportal")

    config.add_translation_dirs("marionb_geomapfish:locale/")

    # scan view decorator for adding routes
    config.scan()

    # add the interfaces
    add_interface(config, "desktop", INTERFACE_TYPE_NGEO)
    add_interface(config, "mobile", INTERFACE_TYPE_NGEO)

    return config.make_wsgi_app()
def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    config = Configurator(
        root_factory=Root, settings=settings,
        locale_negotiator=locale_negotiator,
        authentication_policy=create_authentication(settings)
    )

    config.include("c2cgeoportal")

    config.add_translation_dirs("demo:locale/")

    # scan view decorator for adding routes
    config.scan()

    # add the interfaces
    add_interface(config, "desktop", INTERFACE_TYPE_NGEO)
    add_interface(config, "mobile", INTERFACE_TYPE_NGEO)

    return config.make_wsgi_app()