[web2py] Use of list:reference giving a foreign key error

2015-06-15 Thread Travis May
Here is my code: Controller def index(): form = SQLFORM(db.guest_questionnaire) if form.process().accepted: response.flash = 'form accepted' elif form.errors: response.flash = 'form has errors' else: response.flash = '' return dict(form=form) Model

[web2py] Re: Passing a Variable into a Query

2014-03-02 Thread Travis May
== auth.user.id) (db[db_name].Completed == 1) return db(query).select(db[db_name][db_field]).first()[db_field] Oh my goodness, I could kiss you! Thanks, Travis May On Saturday, March 1, 2014 7:29:17 AM UTC-6, Anthony wrote: Assuming by db_name you really mean the table name, maybe you want

[web2py] Passing a Variable into a Query

2014-02-28 Thread Travis May
First of all, be easy on me, I'm new to coding and new to web2py. I am trying to get some data from the database with the following function: def db_query(db_name, db_record, db_field, length): query = (db.db_name.Financial_Institution==auth.user.id)(db.db_name.Completed==1) db_record

[web2py] What do you think?

2014-02-18 Thread Travis May
I wanted to bring to your attention an app that I built on PythonAnywhere that shows just how quickly you can build something useful with web2py using PythonAnywhere to deploy. http://travismay.pythonanywhere.com/bracket_builder/odds/bracket I built this app, which contains over 14,000 lines