emmett-framework / emmett

The web framework for inventors
BSD 3-Clause "New" or "Revised" License
1.06k stars 71 forks source link

Please create full examples #51

Closed ramstein74 closed 8 years ago

ramstein74 commented 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:

do something

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

gi0baro commented 8 years ago

I'm closing this since it's a duplicate of #52