For the following data relations  System -< Nic -< Ip (where -< means
OneToMany)

 

Using edit_inline it is already possible to view the nics in the system
detail page, 

but I would also like to see which ip's are associated with the listed
nic's. 

Something similar is already in place when inline editing a model which
has a ManyToMany relationship.

 

To be clear, what I want is a system detail page which lists the
following information:

System

Interfaces: 

Interface 1

   Ip:

   10.11.4.2

   10.11.5.2

Interface 2

   Ip: 

   82.17.x.x

 

Currently my data model looks like this:

class System(models.Model):

    name = models.CharField(maxlength=255)

 

class SystemNic(models.Model):

    name = models.CharField(maxlength=45, core=True)

    system = models.ForeignKey(System, edit_inline=models.TABULAR,
core=True)

 

class Ipset(models.Model):

    systemnic = models.ForeignKey(SystemNic, edit_inline=models.TABULAR,
core=True)

    ipaddress = models.CharField(maxlength=15, core=True)

 

Is this possible without denormalization of the data model or is my only
viable option in writing a separate view?

 

With regards,

 

Jos Houtman

System administrator Hyves.nl

email: [EMAIL PROTECTED]

 


--~--~---------~--~----~------------~-------~--~----~
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