Re: [Django] #11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and QuerySet.exclude()

2015-12-27 Thread Django
#11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and
QuerySet.exclude()
-+-
 Reporter:  emulbreh |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  wontfix
 Keywords:  complex_filter,  | Triage Stage:
  add_to_query   |  Someday/Maybe
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by akaariai):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 We will add expressions support instead. This should allow users to do
 what is wanted in this ticket.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.617cf7e73868e70c763898f6f39d71f6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and QuerySet.exclude()

2010-02-03 Thread Django
#11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and
QuerySet.exclude()
---+
  Reporter:  emulbreh  | Owner:  nobody 
 
Status:  new   | Milestone: 
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  
complex_filter, add_to_query
 Stage:  Someday/Maybe | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * stage:  Unreviewed => Someday/Maybe

Comment:

 In order to do this, we would need to formalize the interface that Q
 objects expose. I'm not sure we're in a position to do that at the moment.
 Long term, it's certainly a desirable goal, though.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and QuerySet.exclude()

2009-12-03 Thread Django
#11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and
QuerySet.exclude()
---+
  Reporter:  emulbreh  | Owner:  nobody 
 
Status:  new   | Milestone: 
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  
complex_filter, add_to_query
 Stage:  Unreviewed| Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by emulbreh):

  * has_patch:  0 => 1

Comment:

 ...

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

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




Re: [Django] #11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and QuerySet.exclude()

2009-12-03 Thread Django
#11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and
QuerySet.exclude()
---+
  Reporter:  emulbreh  | Owner:  nobody 
 
Status:  new   | Milestone: 
 
 Component:  Database layer (models, ORM)  |   Version:  SVN
 
Resolution:|  Keywords:  
complex_filter, add_to_query
 Stage:  Unreviewed| Has_patch:  0  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

  * has_patch:  1 => 0
  * version:  1.1 => SVN

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

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




Re: [Django] #11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and QuerySet.exclude()

2009-10-22 Thread Django
#11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and
QuerySet.exclude()
---+
  Reporter:  emulbreh  | Owner:  nobody 
 
Status:  new   | Milestone: 
 
 Component:  Database layer (models, ORM)  |   Version:  1.1
 
Resolution:|  Keywords:  
complex_filter, add_to_query
 Stage:  Unreviewed| Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

  * needs_better_patch:  => 0
  * has_patch:  0 => 1
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and QuerySet.exclude()

2009-10-05 Thread Django
#11981: Add custom Q-object (add_to_query) support to QuerySet.filter() and
QuerySet.exclude()
--+-
 Reporter:  emulbreh  |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  1.1   
 Keywords:  complex_filter, add_to_query  |   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 It would be nice if custom Q-objects could be transparently used in
 `filter()` and `exclude()` calls (if they provide an `__invert__()`
 method).

 The following code illustrates the desired behaviour:
 {{{
 #!python

 class QuerySet(models.query.QuerySet):
 def filter(self, *args, **kwargs):
 if not kwargs and len(args) == 1 and hasattr(args[0],
 'add_to_query'):
 return self.complex_filter(args[0])
 return super(QuerySet, self).filter(*args, **kwargs)

 def exclude(self, *args, **kwargs):
 if not kwargs and len(args) == 1:
 return self.complex_filter(~args[0])
 return super(QuerySet, self).exclude(*args, **kwargs)

 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---