Groups
Groups
Sign in
Groups
Groups
Django users
Conversations
About
Send feedback
Help
Difference between Q and filter and exclude
57 views
Skip to first unread message
Larry Martell
unread,
Dec 22, 2014, 11:51:06 AM
12/22/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Is there any difference, either functional or performance wise,
between these 2 constructs:
Q(f=1) and filter(f=1)
Or, between these 2:
(~Q(f=1)) and exclude(f=1)
Anssi Kääriäinen
unread,
Dec 23, 2014, 9:16:17 AM
12/23/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
These queries should be equivalent.
- Anssi
Reply all
Reply to author
Forward
0 new messages