Re: [Django] #11771: Support filtering by non-database (queryset) fields in the admin

2010-09-13 Thread Django
#11771: Support filtering by non-database (queryset) fields in the admin
---+
  Reporter:  sciyoshi  | Owner:  nobody 
 
Status:  closed| Milestone: 
 
 Component:  django.contrib.admin  |   Version:  SVN
 
Resolution:  duplicate |  Keywords:  admin, filtering, 
filter, filterspec, fields
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  1 |   Needs_tests:  1  
 
Needs_better_patch:  1 |  
---+
Changes (by subsume):

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

Comment:

 Forgive me if I'm being presumptuous but it seems like #5833 would
 encompass this. Closing as dupe.

-- 
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] #11771: Support filtering by non-database (queryset) fields in the admin

2010-02-03 Thread Django
#11771: Support filtering by non-database (queryset) fields in the admin
---+
  Reporter:  sciyoshi  | Owner:  nobody 
 
Status:  new   | Milestone: 
 
 Component:  django.contrib.admin  |   Version:  SVN
 
Resolution:|  Keywords:  admin, filtering, 
filter, filterspec, fields
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  1 |   Needs_tests:  1  
 
Needs_better_patch:  1 |  
---+
Changes (by russellm):

  * needs_better_patch:  0 => 1
  * stage:  Unreviewed => Accepted
  * needs_tests:  0 => 1
  * needs_docs:  0 => 1

Comment:

 I'll accept the idea of being able to filter on annotated fields, but I
 don't particularly like the implementation you provide. It strikes me as a
 whole lot more complex than it should be from an end-users point of view.

 Patch also requires tests and documentation.

-- 
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] #11771: Support filtering by non-database (queryset) fields in the admin

2009-11-28 Thread Django
#11771: Support filtering by non-database (queryset) fields in the admin
---+
  Reporter:  sciyoshi  | Owner:  nobody 
 
Status:  new   | Milestone: 
 
 Component:  django.contrib.admin  |   Version:  SVN
 
Resolution:|  Keywords:  admin, filtering, 
filter, filterspec, fields
 Stage:  Unreviewed| Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

 * cc: ramu...@gmail.com (added)

-- 
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] #11771: Support filtering by non-database (queryset) fields in the admin

2009-11-22 Thread Django
#11771: Support filtering by non-database (queryset) fields in the admin
---+
  Reporter:  sciyoshi  | Owner:  nobody 
 
Status:  new   | Milestone: 
 
 Component:  django.contrib.admin  |   Version:  SVN
 
Resolution:|  Keywords:  admin, filtering, 
filter, filterspec, fields
 Stage:  Unreviewed| Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  0  
 
Needs_better_patch:  0 |  
---+
Changes (by kris_b):

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

Comment:

 I totally support your idea, sciyoshi, I just stumbled upon this myself -
 I added annotation to the queryset method and actually was surprised by
 the ImproperyConfigured exception. A big request to Django decision
 makers: please add support for this feature!

 By the way, as I am new to the community: Great work, guys! Keep it up!

-- 
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=.




[Django] #11771: Support filtering by non-database (queryset) fields in the admin

2009-08-22 Thread Django
#11771: Support filtering by non-database (queryset) fields in the admin
--+-
 Reporter:  sciyoshi  |   Owner:  
nobody
   Status:  new   |   Milestone:

Component:  django.contrib.admin  | Version:  SVN   

 Keywords:  admin, filtering, filter, filterspec, fields  |   Stage:  
Unreviewed
Has_patch:  1 |  
--+-
 It's currently impossible to filter the admin interface by non-database
 fields, even if the fields are being selected in the queryset.

 The attached patch lets you do something like this:

 {{{
 class Author(models.Model):
 name = models.CharField(max_length=255)

 class Book(models.Model):
 author = models.ForeignKey(Author)

 class AuthorAdmin(admin.ModelAdmin):
 list_display = ['name', 'books']
 list_filter = [models.IntegerField(verbose_name='number of books',
 name='num_books')]

 def books(self, obj):
 return obj.num_books
 books.short_description = 'Number of books'

 def queryset(self, request):
 return super(AuthorAdmin,
 self).queryset(request).annotate(num_books=models.Count('book'))

 admin.site.register(Author, AuthorAdmin)
 admin.site.register(Book)
 }}}

 which would show all of the values for num_books in the available filters.
 (This particular example only works in MySQL, but could be applied to
 fields selected with .extra(select=...) instead of .annotate).

-- 
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
-~--~~~~--~~--~--~---