Re: [Django] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-05-07 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner:  zain   
   
Status:  reopened  | Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:|  Keywords:  search, 
inheritance, admin
 Stage:  Ready for checkin | Has_patch:  1  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * stage:  Accepted => Ready for checkin

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



Re: [Django] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-05-01 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner:  zain   
   
Status:  reopened  | Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:|  Keywords:  search, 
inheritance, admin
 Stage:  Accepted  | Has_patch:  1  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by zain):

  * status:  closed => reopened
  * resolution:  fixed =>

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



Re: [Django] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-05-01 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner:  zain   
   
Status:  closed| Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:  fixed |  Keywords:  search, 
inheritance, admin
 Stage:  Accepted  | Has_patch:  1  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by zain):

  * status:  assigned => closed
  * has_patch:  0 => 1
  * resolution:  => fixed

Comment:

 I'll bring up the (possible) ORM bug on the mailing list as a separate
 bug. It's actually pretty easy fix this bug without hitting the other one.
 Fix incoming.

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



Re: [Django] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-04-27 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner:  zain   
   
Status:  assigned  | Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:|  Keywords:  search, 
inheritance, admin
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Comment (by Alex):

 We really should be able to reproduce this without poking at
 internals(which is really want dupe select related is, lack of leading
 underscore be damned).

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



Re: [Django] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-04-27 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner:  zain   
   
Status:  assigned  | Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:|  Keywords:  search, 
inheritance, admin
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Comment (by zain):

 It looks like this might be caused by an ORM bug. Given two querysets q1
 and q2, with list(q1) = [foo] and list(q2) = [foo], there's a case when q1
 & q2 = [].

 I created a quick test to demonstrate the case. It's using the models from
 your example verbatim, but I'll clean it up once I've fixed the bug.

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



Re: [Django] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-04-24 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner:  zain   
   
Status:  assigned  | Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:|  Keywords:  search, 
inheritance, admin
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by zain):

  * owner:  => zain
  * status:  new => assigned

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



Re: [Django] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-04-19 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner: 
   
Status:  new   | Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:|  Keywords:  search, 
inheritance, admin
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

  * owner:  cbess =>

Comment:

 won't have time to finish

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



Re: [Django] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-04-18 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner:  cbess  
   
Status:  new   | Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:|  Keywords:  search, 
inheritance, admin
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by cbess):

  * owner:  nobody => cbess

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



Re: [Django] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-04-02 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
---+
  Reporter:  akaariai  | Owner:  nobody 
   
Status:  new   | Milestone:  1.1
   
 Component:  django.contrib.admin  |   Version:  1.0
   
Resolution:|  Keywords:  search, 
inheritance, admin
 Stage:  Accepted  | Has_patch:  0  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * milestone:  => 1.1

-- 
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] #10516: Admin search doesn't work when having multiple search_fields to the same base model.

2009-03-16 Thread Django
#10516: Admin search doesn't work when having multiple search_fields to the same
base model.
+---
 Reporter:  akaariai|   Owner:  nobody
   Status:  new |   Milestone:
Component:  django.contrib.admin| Version:  1.0   
 Keywords:  search, inheritance, admin  |   Stage:  Unreviewed
Has_patch:  0   |  
+---
 Searching in admin site does not work when search_fields has multiple
 elements from the same base class. This is best described by an example:

 admin.py:
 {{{
 from testi.searchTest.models import *
 from django.contrib import admin
 class TitleInline(admin.TabularInline):
   model = TitleTranslation
   extra = 2

 class RecommenderAdmin(admin.ModelAdmin):
   inlines = [TitleInline]

 class RecommendationAdmin(admin.ModelAdmin):
   inlines = [TitleInline]
   # This works
   search_fields = ('recommender__titletranslation__text', )
   # But this doesn't
   # search_fields = ('titletranslation__text',
 'recommender__titletranslation__text',)

 admin.site.register(Recommendation, RecommendationAdmin)
 admin.site.register(Recommender, RecommenderAdmin)
 }}}


 models.py:
 {{{
 from django.db import models

 class Title(models.Model):
   def __unicode__(self):
 try:
   return self.titletranslation_set.filter(lang="FI")[0].text
 except:
   return "No finnish name defined!"

 LANG_CHOICES = (('FI', 'Finnish'), ('EN', 'English'),)

 class TitleTranslation(models.Model):
   title = models.ForeignKey(Title)
   text = models.CharField(max_length = 100)
   lang = models.CharField(max_length = 2, choices = LANG_CHOICES)

 class Recommender(Title):
   pass

 class Recommendation(Title):
   recommender = models.ForeignKey(Recommender)
 }}}

 Assume we have saved a recommendation with a title of 'Foo' and a
 recommender with a title of 'Bar'. The foreign key is set from 'Foo' to
 'Bar'.

 In the example above, when searching for 'ar' nothing is found when using
 the second version of search_fields. When using the first version, The
 'Foo' recommendation is found correctly. In the second version, searching
 works correctly through titletranslation__text.

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