Given a model such as:

class Country(models.Model):
    code = models.CharField(max_length=2, primary_key=True)
    name = models.CharField()

class Region(models.Model):
    name = models.CharField()
    country = models.ForeignKey(Country)

with an admin option:

class RegionAdmin(admin.ModelAdmin):
    list_filter = ('country', )

Can the filter list for the Region (as shown above in the RegionAdmin class)
be altered in some way such that it only shows those countries that have
regions? i.e. it will not show the complete list of all Countrys, but only
that subset which are already linked to Regions.

Thanks
Derek

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

Reply via email to