Closed ramstein74 closed 8 years ago
Hello, your sample code in docs do not work out of the box. Its not clear that the full code should be written. For example i´m trying to understand how to create a form
your docs says
form weppy import Field, Form from weppy.validators import inSet
@app.expose('/form') def a(): simple_form = Form({ 'name': Field(), 'number': Field('int'), 'type': Field( validation={'in': ['type1', 'type2']} ) }) if simple_form.accepted:
return dict(form=simple_form)
but this is not enough to create a valid form code
i´m not sure but i thing i need to add from weppy import App app = App(name)
and if name == "main": app.run()
Please be more patient with dummies like me and most of the people that follows you.
Regards
I'm closing this since it's a duplicate of #52
Hello, your sample code in docs do not work out of the box. Its not clear that the full code should be written. For example i´m trying to understand how to create a form
your docs says
form weppy import Field, Form from weppy.validators import inSet
@app.expose('/form') def a(): simple_form = Form({ 'name': Field(), 'number': Field('int'), 'type': Field( validation={'in': ['type1', 'type2']} ) }) if simple_form.accepted:
do something
but this is not enough to create a valid form code
i´m not sure but i thing i need to add from weppy import App app = App(name)
and if name == "main": app.run()
Please be more patient with dummies like me and most of the people that follows you.
Regards