コード例 #1
0
ファイル: form_examples.py プロジェクト: tltx/iommi
 def actions__submit__post_handler(form, **_):
     if form.is_valid():
         return html.pre(f"You posted: {form.apply(Struct())}"
                         ).bind(request=request)
コード例 #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)), )
コード例 #3
0
ファイル: form_examples.py プロジェクト: tltx/iommi
 def on_submit(form, **_):
     if not form.is_valid():
         return
     return html.pre(f"You posted: {form.apply(Struct())}").bind(
         request=request)
コード例 #4
0
 class MathPage(HelloWorldPage):
     result = html.pre(format_html("Math result: 1+1={}", math_result))