I hope I understood your problem (as my english is ugly).
I have a similar application: note that I put the foreign key on
Address.

class Address(models.Model):
    address_id = models.AutoField(primary_key=True)
    # Here's the foreign key (note the edit_inline)
    company = models.ForeignKey(Company, edit_inline=models.TABULAR)
    status_id = models.IntegerField(null=True, blank=True)
    ...

class Company(models.Model):
    company_id = models.AutoField(primary_key=True)
    parent_company = models.ForeignKey("self",null=True,blank=True)
    ### address = models.ForeignKey(Address)
    company_name = models.CharField(blank=True, maxlength=150)
    ...

I had no problem with ChangeManipulator (and with a custom manipulator
too). Moreover you don't need to specify the follow argument.

If you want to keep the foreign key on Company I suppose you must use
the Address ChangeManipulator and specify the edit_inline argument.

In the template you have to add a 0 (zero) to identify the first
address. If you want only one Address per Company you can make the
relation one to one  adding unique=True to the company field.

<label for="id_street_number">Street #:</label><br>{{
form.address.0.street_number }}

If you want more documentation, search edit_inline here
http://www.djangoproject.com/documentation/model_api/#relationships

Hope this helps you.

Massimiliano


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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