Hi, You should create an admin class and override its queryset method. Something like this:
class EntryAdmin(admin.ModelAdmin): ... def queryset(self, request): qs = qs = super(EntryAdmin, self).queryset(request) qs = qs.filter(specify your filter criteria) return qs admin.site.register(Entry, EntryAdmin) Regards, Tibor On jan. 21, 15:19, "django_fo...@codechimp.net" <codech...@gmail.com> wrote: > I have a class called Entry that has a one-to-many relationship with > itself like: > > class Entry(models.Model): > title = models.CharField(max_length=255) > body = models.TextField() > author = models.ForeignKey(User) > date_published = models.DateTimeField() > parent = models.ForeignKey('self',null=True,blank=True) > > When I go to the Admin page, I would like to exclude Entries that have > a parent set, I.E. Entries that have parents should not show up in the > list. I have read through the Admin pages and the Meta pages several > times, and nothing has jumped out at me on how to do this. Its > probably there, it just didn't register. > > Can someone please lend me a hand and point me in the correct location? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---