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
== 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
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
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
4 matches
Mail list logo