Login
From:
adamj.eu
(Uncensored)
subscribe
Django: split ModelAdmin.get_queryset() by view - Adam Johnson
https://adamj.eu/tech/2025/07/30/django-modeladmin-split-get-queryset/
links
backlinks
Tagged with:
django
posts
Within Django’s popular admin site, you can override ModelAdmin.get_queryset() to customize the queryset used by the admin views. It’s often used for performance optimizations, such as adding a select_related() call to batch-fetch related objects:
Roast topics
Find topics
Find it!