I was doing some optimization around my auth tables.

User model in django.contrib.auth.models has an m2m to Groups

I want to fetch all the groups for a particular name using User's queryset.

something like this - request.user.groups.filter(name = "xyz")

I want to avoid the inner join orm makes for this qset.

I was wondering if I could create a query using the intermediate table the 
sql created for saving m2m rels 

ex - an intermediate table by the name auth_user_groups is created for the 
User - Group m2m relation.

I want to query his table using orm. 

SO I NEED to know how to create a proxy model for this intermediate table 
"auth_user_grouos" so that i can use it to avoid inner joins

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/n8cqehgSuxkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to