On Wed, Oct 28, 2009 at 5:19 PM, Wim De Hul <w...@dehul.com> wrote: > > Hi all, > > I'm trying to build a web application to keep track of my firewall > requests. > I want to keep track of hosts and hostgroups, but I got stuck in > creating the model. The problem is the following: > ...snip... > Now, a hostgroup contains one or more hosts, but it can also contain one > or more hostgroups.
if a host can only belong to a single hostgroup: Host: id (Primary key) hostgroup (foreing key) name ipaddress netmask creation_date HostGroup: id (primary key) parent (foreign key to 'self') name creation_date if a host can belong to several hostgroups simply change the foreign key from host to hostgroup to a ManyToManyKey. make sure that the 'parent' field in hostgroup is null'able, to account for 'main' groups -- Javier --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---