[web2py] One form for two tables

2016-04-28 Thread Andrea Marin
Hi all, I'm trying to setup a form to manage two tables: db.define_table('pratiche', Field('nome', requires=IS_NOT_EMPTY()), Field('descrizione', 'text', requires=IS_NOT_EMPTY()), Field('stato_pratica', requires=IS_IN_SET(['aperta', 'attesa',

Re: [web2py] Re: How can I pre populate a option column of a form?

2016-04-28 Thread Andrea Marin
rm.process().accepted: > > ... > form.add_button('Back', URL('index')) # it's a DOM-manipulation - > place it after form.process() > > > > > On Friday, April 22, 2016 at 12:23:59 AM UTC+3, Andrea Marin wrote: >> >> Trans a lot >> >>

Re: [web2py] Re: How can I pre populate a option column of a form?

2016-04-21 Thread Andrea Marin
Trans a lot > Il giorno 21 apr 2016, alle ore 05:22, Michael Beller <mjbel...@gmail.com> ha > scritto: > > before you call SQLFORM, insert: > db.pratiche.stato_pratica.default = 'aperta' > > > >> On Wednesday, April 20, 2016 at 6:05:06 PM UTC-4, Andrea

[web2py] How can I pre populate a option column of a form?

2016-04-20 Thread Andrea Marin
Hi I have this type of form in my model file: db.define_table('pratiche', Field('nome', requires=IS_NOT_EMPTY()), Field('descrizione', 'text', requires=IS_NOT_EMPTY()), Field('tipo_allegato', requires=IS_IN_SET(['mandato', 'comparsa preliminare',

[web2py] Show a value only if there is in the db

2016-04-06 Thread Andrea Marin
Hi all, I have a db table where I store some information and sometime a file like *.doc or *.pdf This is my model file db.define_table('pratiche', Field('nome', requires=IS_NOT_EMPTY()), Field('descrizione', 'text', requires=IS_NOT_EMPTY()),