Re: [web2py] DAL issues ....

2018-12-06 Thread Jim Steil
Thanks Ben On Thu, Dec 6, 2018 at 3:42 PM Ben Duncan wrote: > Controller Code: > > def company_login(): > > form = SQLFORM.factory( > Field('username', label = 'User Name', requires=IS_NOT_EMPTY()), > Field('password', 'password', label = >

Re: [web2py] DAL issues ....

2018-12-06 Thread Ben Duncan
Controller Code: def company_login(): form = SQLFORM.factory( Field('username', label = 'User Name', requires=IS_NOT_EMPTY()), Field('password', 'password', label = "Password",requires=IS_NOT_EMPTY()), Field('Company', label = 'Court ID',

Re: [web2py] DAL issues ....

2018-12-06 Thread Jim S
I'd love to see the final controller code if you have the time? Also, I'm curious as to why you're putting all this in the session. Why not just pass it in the dict being returned to the view? -Jim On Thursday, December 6, 2018 at 2:46:22 PM UTC-6, Ben Duncan wrote: > > Ok, YOU GUYS are

Re: [web2py] DAL issues ....

2018-12-06 Thread Ben Duncan
Ok, YOU GUYS are awesome ... Your replies gave me the insight I needed ! Here is the explanation: A: in the database, the passes were for the "lookup" in the SQLFORM.factory SO there was the confusion there ... B: It seems there is a 2 passes thru the controller (which this group

Re: [web2py] DAL issues ....

2018-12-06 Thread Ben Duncan
The request.vars get set from the SQL form in the controller Removed all the COMMENTS, and in the controller put a print and changed the code: DbRows = db(db.company.company_number==Company_ID).select(db.company.company_name).first() print DbRows['company_name']

[web2py] DAL issues ....

2018-12-06 Thread Val K
Maybe I don't understand something, but I think that when the controller is requested for the first time there is no any request.vars and request.vars['Company'] too. Just in case: form.process() doesn't interrupt controller execution -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] DAL issues ....

2018-12-06 Thread Ben Duncan
How can something that seems so simple, be so hard? I can't seem to get a SINGLE field from the database from DAL: First is the Error Message (Or on of the many types - but the latest one), then the code What AM I doing wrong here ? Als always, thanks ... Error Message: Error ticket for "Mec"

[web2py] DAL issues on production server (xen VM)

2013-12-15 Thread Yassen D.
Hello guys, Recently updated from w2p 2.2.1 to 2.8.2 as I was advised; now random errors on database inserts started to raise for stuff that worked on the old version (2.2.1). Tracebacks of the two errors: This is the most common one: File /home/www-data/web2py/gluon/scheduler.py, line 238,