Ali Hassan
Ali Hassan

Reputation: 1

How to override queryset for newly added fieldset in Django Admin Panel

I have added "permissions" fieldset in my User model on Admin Panel, but when I try to add a User it takes a lot of queries due to permissions (500) in my case, I am not able to optimize the code because get_queryset is not executing while adding an object.

I want to know how can I fetch all related permissions in add user form, so it should fetch all select related permissions to optimize the admin panel interface.

Upvotes: 0

Views: 31

Answers (0)

Related Questions