Want to know the raw sql query when user other than superuser logs in the system

114 Views Asked by At

I have an application which involves large number of users. among those, some are staff members.

My problem

When a user from a certain group let say A logs in, it takes 5 minute to see the admin screen (index page). I want to fix this problem.So the question is , What is the sql query when a user from a certain group logs in the admin of the project.

I know how to see query

str(MyModel.objects.filter(name="my name").query)

but again not getting how to generate the query for that case

1

There are 1 best solutions below

0
catavaran On

Install Django Debug Toolbar and you will see all queries executed during user login.