[web2py] Re: define_table - how to do this correctly (best practice?)

2012-01-07 Thread lyn2py
Bump. Help anyone? Can default be equal to a variable dependent on another field in the same table? Thanks! On Jan 6, 6:10 am, lyn2py lyn...@gmail.com wrote: What you say is true, however for argument's sake, how could I achieve the above with the 4th table? In my situation, the 3 tables

[web2py] Re: define_table - how to do this correctly (best practice?)

2012-01-07 Thread Anthony
Can default be equal to a variable dependent on another field in the same table? I haven't looked at your original question in detail, but regarding the above question about defaults, no, they can't be dependent on other fields in the same table (though they can be dependent on

[web2py] Re: define_table - how to do this correctly (best practice?)

2012-01-07 Thread lyn2py
Thanks Anthony, will look into the areas you mentioned! :) On Jan 8, 12:35 am, Anthony abasta...@gmail.com wrote: Can default be equal to a variable dependent on another field in the same table? I haven't looked at your original question in detail, but regarding the above question about

[web2py] Re: define_table - how to do this correctly (best practice?)

2012-01-05 Thread Andrew
I think this is more of a data modeling question than web2py. I would have one table called content with an extra column content_type . You could define queries over the top if you just want one ofthe three. Your M:M table logically joins to content. You sort of have three subtype tables, but

[web2py] Re: define_table - how to do this correctly (best practice?)

2012-01-05 Thread lyn2py
What you say is true, however for argument's sake, how could I achieve the above with the 4th table? In my situation, the 3 tables have different fields (but I didn't have access to the file so I simply made them the same in the example here. Thanks. On Jan 6, 1:24 am, Andrew