Re: [web2py] Forms - MVC model

2012-06-27 Thread Jason Brower
On 06/27/2012 07:30 PM, Jonathan Lundell wrote: On Jun 27, 2012, at 4:08 AM, Pedro Casalinho wrote: This may be a dumb question but, should forms be created in controllers and passed to the view or should they be created in the view, taking into consideration the MVC model MVC is a pretty

Re: [web2py] Forms - MVC model

2012-06-27 Thread Anthony
> > # controllers\default.py > def index(): > return dict(authed_users=SQLTABLE(db().select(db.auth_user.ALL))) > > # views\default\index.html > {{if 'authed_users' in globals():}} > {{=T('Registered users:')}} > {{=authed_users}} > This example does not show a form -- it shows a table

Re: [web2py] Forms - MVC model

2012-06-27 Thread Jonathan Lundell
On Jun 27, 2012, at 4:08 AM, Pedro Casalinho wrote: > This may be a dumb question but, should forms be created in controllers and > passed to the view or should they be created in the view, taking into > consideration the MVC model > > MVC is a pretty leaky abstraction, especially in the conte

Re: [web2py] Forms - MVC model

2012-06-27 Thread Alec Taylor
Create them in the controller, call them from the template (view). Example: # controllers\default.py def index(): return dict(authed_users=SQLTABLE(db().select(db.auth_user.ALL))) # views\default\index.html {{if 'authed_users' in globals():}} {{=T('Registered users:')}} {{=authed_users}} {{e

[web2py] Forms - MVC model

2012-06-27 Thread Pedro Casalinho
This may be a dumb question but, should forms be created in controllers and passed to the view or should they be created in the view, taking into consideration the MVC model --