org.initial_content

Functions

load_content(path) → dict[str, Any]

absolute_path(path, base) → str

create_new_organisation(app, name[, create_files, ...]) → onegov.org.models.Organisation

add_pages(session, path) → None

add_builtin_forms(session[, definitions, locale]) → None

builtin_form_definitions([path, locale]) → collections.abc.Iterator[tuple[str, str, str]]

Yields the name, title and the form definition of all form definitions

load_definition(path) → tuple[str, str]

Loads the title and the form definition from the given file.

add_resources(libres_context, translate) → None

add_filesets(session, organisation_name, path) → None

add_events(session, name, translate, create_files) → None

Module Contents

org.initial_content.load_content(path: str) → dict[str, Any][source]
org.initial_content.absolute_path(path: str, base: _typeshed.StrPath) → str[source]
org.initial_content.create_new_organisation(app: onegov.org.app.OrgApp, name: str, create_files: bool = True, path: str | None = None, locale: str = 'de_CH') → onegov.org.models.Organisation[source]
org.initial_content.add_pages(session: sqlalchemy.orm.Session, path: str) → None[source]
org.initial_content.add_builtin_forms(session: sqlalchemy.orm.Session, definitions: collections.abc.Iterable[tuple[str, str, str]] | None = None, locale: str = 'de_CH') → None[source]
org.initial_content.builtin_form_definitions(path: _typeshed.StrPath | None = None, locale: str = 'de_CH') → collections.abc.Iterator[tuple[str, str, str]][source]

Yields the name, title and the form definition of all form definitions in the given or the default path.

org.initial_content.load_definition(path: str) → tuple[str, str][source]

Loads the title and the form definition from the given file.

org.initial_content.add_resources(libres_context: libres.context.core.Context, translate: collections.abc.Callable[[translationstring.TranslationString], str]) → None[source]
org.initial_content.add_filesets(session: sqlalchemy.orm.Session, organisation_name: str, path: str) → None[source]
org.initial_content.add_events(session: sqlalchemy.orm.Session, name: str, translate: collections.abc.Callable[[translationstring.TranslationString], str], create_files: bool) → None[source]