Hello there,

I have two models, Network and Address and have setup a filter (in the
admin interface, which I like) for Address, to show only free
addresses which works. I also have a filter on network, which works,
however this is not really dynamic, because if I have 2 networks
10.0.0.0/8 and 10.10.10.0/24, and address of 10.10.10.20 would be part
of both networks!

class Network(models.Model):
    ip = models.CharField('IP', maxlength=15)
    mask_len = models.PositiveIntegerField('mask length')

class Address(models.Model):
    ip = models.CharField('IP', maxlength=15)
    is_free = models.BooleanField('free')
    network = models.ForeignKey(Network)
    class Admin:
        list_filter = ('is_free', 'network')

I now would like to have a similar filter in the Address part of the
admin interface, to display a list of all addresses that are part of a
network. From what I read/understood, I can setup a manager method,
but this requires also that I setup a view, template and more, and
then it would not even be integrated into the admin interface. Does
anyone have a idea on how to do this?

I hope I explained clearly enough what I would like to accomplish and
thank you for your input.


tom


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