Re: [web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-15 Thread Annet
Hi Yogesh, After trying different approaches, I decided to do the following: define a table 'Node' and a table 'person' referencing 'node' this gives me the opportunity to have a table 'organization' too. All other tables including 'address' reference the table 'node'. I added an extra field

Re: [web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-15 Thread Yogesh
Thanks Annet. This is the exact plan i was having.. Since i am new to python and web2py both. Was little stuck.. I also tried checking out code of conf2py.. for registration details... *Also, are you able to edit details of the user profile.* Since when i used different tables i was not able

[web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-15 Thread Luc Chase
You haven't actually stated your business rule, nor have you mentioned any need to preserve a history of addresses, but the correct structure from a db design point of view is likely to be that the table storing the owner of the addresses has a one-to-many relation with the address table. i.e.

Re: [web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-15 Thread Yogesh
Hi luc, Following is what i am looking for::: - Candidate Applies for posted vacancy using the registration form. (Release 1) - Email-id is the username. - Registration Form 1 (First Name, Last Name, Email, Password, Confirm Password) - Email Sent for activation. Pop-up to

[web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-14 Thread pbreit
Consider the easiest approach first: put all the address fields in the candidate table. If you have good reason to believe this is not the DB design you want, then consider a separate address table. That will complicate the code a bit because you'll need to program the logic to link the

Re: [web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-14 Thread Yogesh
Hello, I have used the *easiest approach first: put all the address fields in the candidate table.*Even the second approach is possible. But should i keep 2 seperate tables for both address types... Thanks... On Mon, May 14, 2012 at 10:57 PM, pbreit pbreitenb...@gmail.com wrote: Consider the

[web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-14 Thread Annet
In my database design I put the Addresses in a separate table. In the Address table I have a field aType with an IS_IN_SET validator for the types of addresses in the domain. IS_IN_SET([(1,'Permanent'),(2,'Current')],zero='select a value') I use SQLFORM.factory to create a custom form, but

Re: [web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-14 Thread Yogesh
Annet, Trying similiar approach.. Little confused.. everytime i am able to submit multiple addresses for any registered user.. 1. User registers by default registration page. 2. After login, user fills up address and personal details. Both tables are linked to the Auth user table. I need to