[web2py] Re: unexpected behavior on sqlite insert

2016-05-12 Thread Sandro Javiel
all new projects. Congrats for the robust framework and all the help. Cheers Em quinta-feira, 12 de maio de 2016 22:41:31 UTC-3, Anthony escreveu: > > On Thursday, May 12, 2016 at 9:25:02 PM UTC-4, Sandro Javiel wrote: >> >> Thanks a lot for general comments regardi

[web2py] Re: unexpected behavior on sqlite insert

2016-05-12 Thread Sandro Javiel
Thanks a lot for general comments regarding user validation. User is not expected to edit professor_id neither institution_id. Anyway such information should be stored in classroom table. I tried to use SQLFORM(db.classroom), but I don“t want to allow use choose both Ids. Is there an alternat

[web2py] Re: unexpected behavior on sqlite insert

2016-05-12 Thread Sandro Javiel
I just figured out the problem is in *request.vars.professor_inst_id* and *request.vars.professor_id*How should I access form field names professor_inst_id for instance? Tkx Em quinta-feira, 12 de maio de 2016 21:00:09 UTC-3, Sandro Javiel escreveu: > > In fact form is processed a

[web2py] Re: unexpected behavior on sqlite insert

2016-05-12 Thread Sandro Javiel
In fact form is processed and new classroom is created, however with insititution and professor equals None: Em quinta-feira, 12 de maio de 2016 20:45:35 UTC-3, Sandro Javiel escreveu: > > HI Anthony, > > I have a function in controller group exposed using url group/new

[web2py] Re: unexpected behavior on sqlite insert

2016-05-12 Thread Sandro Javiel
> db.commit() to commit any changes to the database (this is done > automatically in the context of HTTP requests). > > Anthony > > On Thursday, May 12, 2016 at 4:57:29 AM UTC-4, Sandro Javiel wrote: >> >> Hi all, >> >> My app has model as shown below. If I

[web2py] unexpected behavior on sqlite insert

2016-05-12 Thread Sandro Javiel
Hi all, My app has model as shown below. If I use appadmin interface I can insert on tables which have some onstraints like classroom (fk: professor.id and institution.id). However using form =FORM('Nome da turma:', INPUT(_name='name', requires=IS_NOT_EMPTY()), 'Disciplina:'