Esempio n. 1
0
 def actions__submit__post_handler(form, **_):
     if form.is_valid():
         return html.pre(f"You posted: {form.apply(Struct())}"
                         ).bind(request=request)
Esempio n. 2
0
def page_view_example_3(request):
    math_result = 1 + 1

    return HelloWorldPage(parts__result=html.pre(
        format_html("Math result: 1+1={}", math_result)), )
Esempio n. 3
0
 def on_submit(form, **_):
     if not form.is_valid():
         return
     return html.pre(f"You posted: {form.apply(Struct())}").bind(
         request=request)
Esempio n. 4
0
 class MathPage(HelloWorldPage):
     result = html.pre(format_html("Math result: 1+1={}", math_result))