Skip to content

Getting started guide fails at Step 5 #27

@rsyring

Description

@rsyring

If you copy & paste directly from the getting started guide (https://hypergen.it/gettingstarted/begin/) you will hit Step 5 and get an exception similar to:

...
Exception: <function step5 at 0x72b40578a4d0>: Partial loading requires a target_id. Either as a kwarg or an attribute on the base_template function.

I fixed this by adding a target_id to the template function:

@contextmanager
def base_template():
    doctype()
    with html():
        with head():
            link(href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css")
        with body(id_='body'):
            yield


base_template.target_id = 'body'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions