org.cli

Provides commands used to initialize org websites.

Module Contents

Functions

add(→ Callable[[OrgRequest, OrgApp], None])

Adds an org with the given name to the database. For example:

import_digirez(→ Callable[[OrgRequest, OrgApp], None])

Imports a Digirez reservation database into onegov.org.

fix_tags(→ Callable[[OrgRequest, OrgApp], None])

close_ticket(→ None)

fetch(→ Callable[[OrgRequest, OrgApp], None])

Fetches events from other instances.

fix_directory_files(→ Callable[[OrgRequest, OrgApp], None])

Not sure of this doubles the files, but actually the file

migrate_town(→ Callable[[OrgRequest, OrgApp], None])

Migrates the database from an old town to the new town like in the

migrate_links_cli(→ Callable[[OrgRequest, OrgApp], None])

Migrates url's in pages. Supports domains and full urls. Most of

migrate_publications(→ Callable[[OrgRequest, OrgApp], ...)

Marks signed files for publication.

delete_invisible_links(→ Callable[[OrgRequest, ...)

Deletes all the data associated with a period, including:

Attributes

cli

org.cli.cli[source]
org.cli.add(group_context: onegov.core.cli.core.GroupContext, name: str, locale: str) Callable[[OrgRequest, OrgApp], None][source]

Adds an org with the given name to the database. For example:

onegov-org –select ‘/onegov_org/evilcorp’ add “Evilcorp”

org.cli.import_digirez(accessdb: str, min_date: str, ignore_booking_conflicts: bool) Callable[[OrgRequest, OrgApp], None][source]

Imports a Digirez reservation database into onegov.org.

Example:

onegov-org –select ‘/orgs/govikon’ import-digirez room_booking.mdb

org.cli.fix_tags(group_context: onegov.core.cli.core.GroupContext, dry_run: bool) Callable[[OrgRequest, OrgApp], None][source]
org.cli.close_ticket(ticket: onegov.ticket.Ticket, user: onegov.user.User, request: onegov.org.request.OrgRequest) None[source]
org.cli.fetch(group_context: onegov.core.cli.core.GroupContext, source: Sequence[str], tag: Sequence[str], location: Sequence[str], create_tickets: bool, state_transfers: Sequence[str], published_only: bool, delete_orphaned_tickets: bool) Callable[[OrgRequest, OrgApp], None][source]

Fetches events from other instances.

Only fetches events from the same namespace which have not been imported themselves.

Example

onegov-org –select ‘/veranstaltungen/zug’ fetch –source menzingen –source steinhausen

–tag Sport –tag Konzert –location Zug

Additional parameters:

–state-transfers published:withdrawn

Will update the local event.state from published to withdrawn automatically. If there are any tickets associated with the event, the will be closed automatically.

—pusblished_only: When passing the remote items to the EventCollection, only add events if they are published.

–delete-orphaned-tickets

Delete Tickets, TicketNotes and TicketMessasges if an event gets deleted automatically.

The following example will close tickets automatically for submitted and published events that were withdrawn on the remote.

onegov-event –select ‘/veranstaltungen/zug’ fetch –source menzingen –source steinhausen

–published-only –create-tickets –state-transfers published:withdrawn –state-transfers submitted:withdrawm

org.cli.fix_directory_files(group_context: onegov.core.cli.core.GroupContext) Callable[[OrgRequest, OrgApp], None][source]

Not sure of this doubles the files, but actually the file reference remains, so it shouldn’t

This command will become obsolete as soon as the type of files in submissions are set correctly with type ‘directory’.

org.cli.migrate_town(group_context: onegov.core.cli.core.GroupContext) Callable[[OrgRequest, OrgApp], None][source]

Migrates the database from an old town to the new town like in the upgrades.

Migrates url’s in pages. Supports domains and full urls. Most of the urls are located in meta and content fields.

org.cli.migrate_publications(group_context: onegov.core.cli.core.GroupContext, dry_run: bool) Callable[[OrgRequest, OrgApp], None][source]

Marks signed files for publication.

Deletes all the data associated with a period, including: Example:

onegov-org –select /foo/bar delete-invisible-links