Hi Massimiliano,
I hope you don't mind my emailing you directly... I sent a reply on the
groups... but thought I'd send it directly to you as well... since you seem
to be using this technique...
In my form I'm using the following ( I tried putting a 0 in there like your
sample..but it gave an unindexable object error )
<label for="id_street_number">Street #:</label><br>{{
form.address.street_number }}
Now in my company definition I have:
class Company(models.Model):
company_id = models.AutoField(primary_key=True)
parent_company = models.ForeignKey("self",null=True,blank=True)
address =models.ForeignKey(Address,unique=True,edit_inline=models.TABULAR)
#models.IntegerField(null=True, blank=True)
company_name = models.CharField(blank=True, maxlength=150)
company_description = models.CharField(blank=True, maxlength=300)
update_user =models.ForeignKey(UserInfo)#models.IntegerField(null=True,
blank=True)
time_stamp = models.DateTimeField()
def __str__(self):
return self.company_name
class Meta:
db_table = 'company'
It isn't erroring out..so it seems to know what the address field is... but
doesn't show an edit box? Did I miss something that I should be doing..or
can I not do it with the comany change manipulator? I can't use the
address...because an address will be on a company object..as well as some
others I have..not just only on a Company object.
Thanks for any info,
Carole
On 12/13/06, Massimiliano Ravelli <[EMAIL PROTECTED]> wrote:
>
>
> [EMAIL PROTECTED] ha scritto:
>
> > I'm not using the admin interface though...will this work with that?
> > (I'll give it a shot and see)
>
> edit_inline argument works well with both admin interface and custom
> views (I'm using the latter).
>
> Massimiliano
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---