Example #1
0
 def __init__(self, *args, **kwargs):
     super().__init__(*args, **kwargs)
     self.helper = FormHelper()
     self.helper.layout = Layout(
         Div(Button.primary("add", "Add contact")),
         Div(Button.secondary("find", "Find address")),
         Div(Button.secondary("win", "Win lottery", disabled=True)),
         Div(Button.warning("delete", "Delete account")),
         Div(HTML(button_link(reverse("home"), "Go Home"))),
     )
Example #2
0
def test_warning_button():
    button = Button.warning("name", "Title")
    assert parse_template(TEMPLATE, input=button) == parse_contents(
        RESULT_DIR, "warning.html"
    )