Ejemplo n.º 1
0
class TestForm(forms.Form):

    string = forms.String(label='Label',
                          help_text='Help',
                          default='default',
                          read_only=True)
    number = forms.Integer()
Ejemplo n.º 2
0
        class TestForm(forms.ModelForm):

            value = forms.String(required=False)

            class Meta:
                model = self.TestModel
                fields = ('value', )
Ejemplo n.º 3
0
class SettingsForm(forms.Form):

    secret_key = forms.String()
    debug = forms.Boolean()

    urls = forms.String()

    databases = forms.Array(field=forms.Map(
        schema={
            'alias': forms.String(default='default'),
            'uri': forms.String(),
            'name': forms.String(),
            'options': forms.Map(default={})
        }))

    tornado_application_settings = forms.Map(default={})

    nosetests_arguments = forms.Array(field=forms.String(), default=[])

    models = forms.Array(field=forms.String(), default=[])
    commands = forms.Map(default={})
Ejemplo n.º 4
0
    class TestForm(forms.Form):

        value = forms.String()
Ejemplo n.º 5
0
class UserForm(forms.ModelForm):

    value = forms.String()

    class Meta:
        model = User