[web2py] Re: Hierarchical Database Selection

2013-01-13 Thread Dave Cenker
'), Field('num_cars')) companies = db(db.company.id.belongs(db(db.train.user_id==id)._select(db.train.company,distinct=True)).select(orderby= db.company.name) On Friday, 11 January 2013 17:05:02 UTC-6, Dave Cenker wrote: I am putting together a website for my son so that he can keep

[web2py] Hierarchical Database Selection

2013-01-11 Thread Dave Cenker
I am putting together a website for my son so that he can keep track of trains that he has seen in our area. Here are the applicable models: db.define_table('company', Field('name'), Field('symbol')) db.define_table('train', Field('user', 'reference auth_user', default=auth.user_id),

[web2py] Re: Associate a db record with a logged in user

2013-01-08 Thread Dave Cenker
Thank you very much! I knew it had to be simple. I just didn't infer that information from the way the book explained it. Your help is much appreciated! On Monday, January 7, 2013 3:31:33 PM UTC-5, Dave Cenker wrote: This seems so elementary, but I can't seem to find out how to do

[web2py] Associate a db record with a logged in user

2013-01-07 Thread Dave Cenker
This seems so elementary, but I can't seem to find out how to do it in the book or googling the group ... I have several users defined and when that user is logged in and is creating a db record that is specific to that user, I want it to be automatically assigned to him/her. For example,

[web2py] Customizing select options in crud.create forms

2013-01-04 Thread Dave Cenker
I have a set of models defined as follows: db.define_table('company', Field('name'), Field('symbol'), Field('approved', 'boolean')) db.define_table('locomotive', Field('manufacturer'), Field('model'), Field('approved', 'boolean'), db.define_table('engine', Field('company',

[web2py] Processing user entries prior to database commit

2012-12-16 Thread Dave Cenker
I first must say that I have developed 2 different web applications using Django in the past and I am very impressed and encouraged by what web2py can offer to the web framework community. However, I am having trouble carrying out a seemingly simple task without much ado after reviewing all