Re: [Django] #29707: New admin autocomplete widget ignores limit_choices_to filter in referring FK definition

2020-10-28 Thread Django
#29707: New admin autocomplete widget ignores limit_choices_to filter in 
referring
FK definition
-+-
 Reporter:  David W. Lloyd   |Owner:  Johannes
 Type:   |  Hoppe
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Gordon Wrigley):

 Considering the case of an FK from choice to poll called my_poll. It
 would've been nice if the autocomplete call was
 `choice/autocomplete?field=my_poll=bob` instead of
 `poll/autocomplete?term=bob` that would have made context based filtering
 way way easier.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.a574ea4b24cafca81d887aeb72884638%40djangoproject.com.


Re: [Django] #29707: New admin autocomplete widget ignores limit_choices_to filter in referring FK definition

2020-10-28 Thread Django
#29707: New admin autocomplete widget ignores limit_choices_to filter in 
referring
FK definition
-+-
 Reporter:  David W. Lloyd   |Owner:  Johannes
 Type:   |  Hoppe
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Gordon Wrigley):

 * cc: Gordon Wrigley (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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.b3a481afac4f89898ccb0337fecfb48b%40djangoproject.com.


Re: [Django] #29707: New admin autocomplete widget ignores limit_choices_to filter in referring FK definition

2020-05-24 Thread Django
#29707: New admin autocomplete widget ignores limit_choices_to filter in 
referring
FK definition
-+-
 Reporter:  David W. Lloyd   |Owner:  Johannes
 Type:   |  Hoppe
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by ehossack):

 * cc: ehossack (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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.1e5e9c18a93b0f1c269773123984a04d%40djangoproject.com.


Re: [Django] #29707: New admin autocomplete widget ignores limit_choices_to filter in referring FK definition

2020-05-21 Thread Django
#29707: New admin autocomplete widget ignores limit_choices_to filter in 
referring
FK definition
-+-
 Reporter:  David W. Lloyd   |Owner:  Johannes
 Type:   |  Hoppe
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carsten Fuchs):

 * cc: Carsten Fuchs (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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.934efecd67560696e21e0d01da78cb4b%40djangoproject.com.


Re: [Django] #29707: New admin autocomplete widget ignores limit_choices_to filter in referring FK definition

2018-08-30 Thread Django
#29707: New admin autocomplete widget ignores limit_choices_to filter in 
referring
FK definition
-+-
 Reporter:  David W. Lloyd   |Owner:  Johannes
 Type:   |  Hoppe
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by leibowitz):

 I've had the same issue, and tried to fix it using proxy models (to
 customise the queryset). Unfortunately modifying the field model to the
 proxy is not an option, so had to use hacks to replace the widget/model,
 first via formfield_for_dbfield, but that creates a bunch of issues.

 Again, unfortunately the only way I found that worked was to overwrite the
 widget for each field in
 formfield_for_foreignkey/formfield_for_manytomany.

 But again, using the proxy model causes issues, like having to create a
 new model and register it through a new ModelAdmin class, which can be an
 issue if this be supported within django.

 Finally I found that it's possible to customise the AutocompleteJsonView,
 which is fairly easy to do.

 Here is a snippet of what I've done so far:
 https://gist.github.com/leibowitz/7a237ea8151f2d238b19ec0da5db545c

 Not sure if that's useful, but I can transform that to a patch into django
 ModelAdmin and AutocompleteJsonView classes, if that's good enough.

 Note that the whole widget customisation wouldn't be needed in that case,
 obviously.

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


Re: [Django] #29707: New admin autocomplete widget ignores limit_choices_to filter in referring FK definition

2018-08-24 Thread Django
#29707: New admin autocomplete widget ignores limit_choices_to filter in 
referring
FK definition
-+-
 Reporter:  David W. Lloyd   |Owner:  Johannes
 Type:   |  Hoppe
  Cleanup/optimization   |   Status:  assigned
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * version:  2.1 => master
 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 OK, lets accept this given the previous discussion on #29010. (Joe, I'm
 assuming you're happy to take this on: if not please un-assign.)

 We'll re-assess #29010 after this.

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