Пример #1
0
def form_example_5(request):
    ensure_objects()
    return Form.create(
        auto__model=Bar,
        fields__b__input__template='iommi/form/choice_select2.html',
        actions=dict(
            foo=Action.submit(attrs__value='Foo'),
            bar=Action.submit(attrs__value='Bar'),
            back=Action(display_name='Back to index', attrs__href='/'),
        ))
Пример #2
0
 class BusyPage(Page):
     tfoo = Table(auto__model=TFoo,
                  page_size=5,
                  columns__name__filter=dict(include=True,
                                             field__include=True))
     tbar = Table(auto__model=TBar,
                  page_size=5,
                  columns__b__filter=dict(include=True,
                                          field__include=True))
     create_tbar = Form.create(auto__model=TBar)
Пример #3
0
def form_example_2(request):
    # NOTE: See urls.py for example 2b! This example is equivalent to this view, but is defined fully in views.py
    return Form.create(auto__model=Foo)