Hi,

I'm looking for the recommended way of handling this.  I have some models
like so:

class ContactInfo(models.Model):
    uuid            = UUIDField('UUID', blank=False, maxlength=50,
core=True, unique=True, editable=False)
    first_name      = models.CharField(blank=True, maxlength=20)
    last_name       = models.CharField(blank=True, maxlength=20)
    address1        = models.CharField(blank=True, maxlength=100)

class TestProfile( models.Model):
    uuid                    = UUIDField('UUID', blank=False, maxlength=50,
core=True, unique=True, editable=False)
    website_name            = models.CharField(blank=False, null=True,
maxlength=100)
    number_of_employees     = models.IntegerField(blank=False, null=True)
    primary_contact_info    = models.ForeignKey(ContactInfo,
related_name='primary_address', blank=False, null=True)
    secondary_contact_info      = models.ForeignKey(ContactInfo,
related_name='payee_address', blank=False, null=True)

I want to be able to simply call the form_for_model function and get a form
for the TestProfile but this doesn't work out of the box if you are
submitting all new data for the contact fields.

So the question is how is this normally done?  Doesn't seem possible with
using auto_id to distinguish the two ContactInfo fields of TestProfile in
the form since the "name" attribute is still the same.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to