1

My question is the following: can you exclude objects that are duplicated from being displayed on the admin page without DB modification, and if yes, how?

Thanks for all the help in advance

Mark
  • 83
  • 1
  • 1
  • 7
  • [this](https://stackoverflow.com/questions/12354099/override-default-queryset-in-django-admin) will teach you a lot about ModelAdmin queryset – Lemayzeur Apr 27 '18 at 14:28

1 Answers1

1

You can overwrite queryset inside your Admin model

def queryset(self, request):
    qs = super(MyModelAdmin, self).queryset(request)
    # update your query somehow
    return qs.distinct()
Danil
  • 4,781
  • 1
  • 35
  • 50