org.initial_content

Functions

load_content(→ dict[str, Any])

absolute_path(→ str)

create_new_organisation(→ onegov.org.models.Organisation)

add_pages(→ None)

add_builtin_forms(→ None)

builtin_form_definitions(→ Iterator[tuple[str, str, str]])

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

load_definition(→ tuple[str, str])

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

add_resources(→ None)

add_filesets(→ None)

add_events(→ 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: Iterable[tuple[str, str, str]] | None = None, locale: str = 'de_CH') None[source]
org.initial_content.builtin_form_definitions(path: StrPath | None = None, locale: str = 'de_CH') 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: Callable[[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: Callable[[TranslationString], str], create_files: bool) None[source]