File: conftest.py

package info (click to toggle)
python-django-crispy-forms 2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,056 kB
  • sloc: python: 3,078; makefile: 88
file content (21 lines) | stat: -rw-r--r-- 467 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import pytest

from crispy_forms.layout import HTML, Div, Field, Fieldset, Layout, Submit


@pytest.fixture
def advanced_layout():
    return Layout(
        Div(
            Div(Div("email")),
            Div(Field("password1")),
            Submit("save", "save"),
            Fieldset(
                "legend",
                "first_name",
                HTML("extra text"),
            ),
            Layout("password2"),
        ),
        "last_name",
    )