On Jun 16, 6:36 am, samwyse <samw...@gmail.com> wrote:
> Not quite.  It's more like this:
>
> db.define_table('person',SQLField('name'))
> db.define_table('method',SQLField('name'))
> db.define_table('contact',
>     SQLField('person',db.person),
>     SQLField('method',db.method),
>     SQLField('info'))

I was thinking about a more general approach where 'info' can be a
bunch of fields (like an address with city, state, country,
postalcode, ...) and then I would take advantage of web2py's SQLFORM
or FORM to process it.

My current model has the same 'person' table but 'method' includes the
tablename (e.g. 'address') where the info should be placed, and in
table 'contact' instead of 'info' I store the id of the entry made in
the 'address' table.

Creating the form(s) to handle this is another story, currently
developing in a separate post.
It will probably need some ajax.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to