Skip to content

[BUG] Example not work #775

@analista01

Description

@analista01

In the example (https://www.fastht.ml/docs/tutorials/by_example.html):

class Person:
def init(self, name, age):
self.name = name
self.age = age

def __ft__(self):
    return ['div', [f'{self.name} is {self.age} years old.'], {}]

p = Person('Jonathan', 28)
print(to_xml(Div(p, "more text", cls="container")))

Output not render the tag "div", show:

['div', ['Jonathan is 28 years old.'], {}]more text

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions