reservation.core

Classes

LibresIntegration

Provides libres integration for

Module Contents

class reservation.core.LibresIntegration[source]

Provides libres integration for onegov.core.framework.Framework based applications.

The application must be connected to a database

Usage:

from onegov.core import Framework

class MyApp(Framework, LibresIntegration):
    pass
configure_libres(**cfg: Any) None[source]

Configures the libres integration and leaves two properties on the class:

Libres_context:

The libres context configured for the current application.

Libres_registrye:

The libres registry bound to the current application.

With those two a scheduler can easily be created:

from libres import new_scheduler
scheduler = new_scheduler(
    app.libres_context, 'test', 'Europe/Zurich'
)
static libres_context_from_session_manager(registry: libres.context.registry.Registry, session_manager: onegov.core.orm.session_manager.SessionManager) libres.context.core.Context[source]
property libres_resources: onegov.reservation.collection.ResourceCollection[source]