get_queryset not working with admin
See original GitHub issueHi,
I’ve defined custom get_queryset
method for my resource class. I’v set the resource class for my admin class, but when I export data via Django admin the results are not filtered as I want.
It seems like my get_queryset
method is not evaluated (checked that with print).
Everything works fine when I go to Django shell and export the resource manually.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Django model admin custom get_queryset pagination is not ...
In my django code i am displaying user list with custom queryset: class UserAdmin(admin.ModelAdmin): def get_queryset(self, request): qs ...
Read more >ModelAdmin.get_queryset doesn't accept ValueQuerySet
Django Admin crashes for following code: models.py from django.db import models from django.contrib.auth.models import User class Category(models.
Read more >2. How to optimize queries in Django admin? - Books by Agiliq
get_queryset method on model admin to annotate the calculated fields. ; ModelAdmin we have for Origin : ; get_queryset to annotate the counted...
Read more >list_editable" doesn't work in admin changelist view, using ...
Coding example for the question "list_editable" doesn't work in admin changelist view, using custom get_queryset() method-django.
Read more >How to almost get facet counts in the Django admin
get_queryset (request) - which returns the unfiltered root queryset. Trying to get filtered counts. The challenge here is to get access to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also got the impression reading the docs that I could just override
get_queryset
to change the query. Then I found this useful issue 😃 The easiest fix may be to just make the docs more clear.This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.