Re: [Django] #29010: Which models is querying search_fields to autocomplete?

2018-01-11 Thread Django
#29010: Which models is querying search_fields to autocomplete?
-+-
 Reporter:  Muslu Y. |Owner:  nobody
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  ForeignKey,  | Triage Stage:
  get_search_results, search_fields  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Muslu Y.):

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


Comment:

 I think Autocomplete is not enough right now.

 **models.py**

 {{{
 class A(models.Model):
 a_name = models.CharField(max_length=100)

 class B(models.Model):
 b_name   =   models.ManyToManyField(A)

 class C(models.Model):
 c_name   =   models.ManyToManyField(A)
 }}}


 **admin.py**

 {{{
 class AAdmin(admin.ModelAdmin):
 search_fields   =   ['a_name']

 def get_search_results(self, request, queryset, search_term):
 queryset, use_distinct  =   super().get_search_results(request,
 queryset, search_term)

 ## how can i learn which models (B or C) querying for a_name?
 ## because i want to separately filter for every model


 class BAdmin(admin.ModelAdmin):
 autocomplete_fields=   ['b_name']

 class CAdmin(admin.ModelAdmin):
 autocomplete_fields=   ['c_name']
 }}}

-- 
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/071.b35a396b821c1d45194624da328462d2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29010: Which models is querying search_fields to autocomplete?

2018-01-11 Thread Django
#29010: Which models is querying search_fields to autocomplete?
-+-
 Reporter:  Muslu Y. |Owner:  nobody
 Type:  New feature  |   Status:  closed
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  ForeignKey,  | Triage Stage:
  get_search_results, search_fields  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Tim Graham):

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


Comment:

 I don't understand your question, and this isn't the place to ask usage
 questions. Please see TicketClosingReasons/UseSupportChannels.

-- 
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/071.b0b6dc142e7f9d8d2a499aeeec89e2f2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29010: Which models is querying search_fields to autocomplete? (was: Which models is using search_fields to get_search_results)

2018-01-11 Thread Django
#29010: Which models is querying search_fields to autocomplete?
-+-
 Reporter:  Makdos Bilişim   |Owner:  nobody
  Teknolojileri  |
 Type:  New feature  |   Status:  new
Component:  Database layer   |  Version:  2.0
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  ForeignKey,  | Triage Stage:
  get_search_results, search_fields  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  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 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/071.a8410656d981ff1d808e14133438426c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.