betty.project.extension.demo package - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.project.extension.demo package

## Submodules

- betty.project.extension.demo.copyright_notice module
  - `Streetmix`
    - `Streetmix.summary`
    - `Streetmix.text`
    - `Streetmix.url`
- betty.project.extension.demo.project module
  - `create_project()`
  - `load_ancestry()`
- betty.project.extension.demo.serve module
  - `DemoServer`
    - `DemoServer.__init__()`
    - `DemoServer.public_url`
    - `DemoServer.start()`
    - `DemoServer.stop()`

## Module contents

Provide demonstration site functionality.

final class betty.project.extension.demo.Demo

  Bases: `ShorthandPluginBase`, `NavigationLinkProvider`, `Extension`

  Provide demonstration site functionality.

  classmethod depends_on() → set[PluginIdentifier[Extension]]

    The plugins this one depends on.

  register_event_handlers(registry: EventHandlerRegistry) → None

    Register event handlers with the project.

  secondary_navigation_links() → Sequence[NavigationLink]

    The secondary navigation links.

async betty.project.extension.demo.generate_with_cleanup(project: Project) → None

  Generate a demonstration site, and clean up the project directory on any errors.

  This is internal. It MAY be used anywhere in Betty’s source code, but MUST NOT be used by third-party code.