Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2021-04-12 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
-+-
 Reporter:  Jonathan Nye |Owner:  Johannes
 |  Maron
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  autocomplete | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Johannes Maron):

 I am happy you found a solution. And this should be the last big change on
 this feature for a while.

-- 
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/064.15aa8de68376a2d4cb1673fd1a9cb6e4%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2021-04-08 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
-+-
 Reporter:  Jonathan Nye |Owner:  Johannes
 |  Maron
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  autocomplete | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by 007):

 I have change my package in  https://github.com/007gzs/django-
 cool/commit/63b0ea6021ea50ad40a2d5d0af6ae9c6cbcdab0f

-- 
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/064.7b894b46ad4c8b2834cb978726ae2ee2%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2021-04-08 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
-+-
 Reporter:  Jonathan Nye |Owner:  Johannes
 |  Maron
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  autocomplete | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by 007):

 Replying to [comment:30 Johannes Maron]:
 > Hi 007,
 >
 > Thank you for reaching out. I understand your frustration. However, the
 `AutocompleteMixin` was never documented, which means it is not considered
 a public API. Private APIs are not subject to deprecation. That is the
 risk you take, when using a private API.
 >
 > All that being said, is there anything I could be of help with? If you
 have a 3rd party package, that needs assistance, I would be delighted to
 help.
 >
 > Best,
 > Joe
 In my package to achieve a similar function of this submission. I'm going
 to try to re implement it in the way of 3.2, and compatible with earlier
 versions

 https://github.com/007gzs/django-
 
cool/blob/f13d52b571eb77c02b062523bc1d79cdeed31b5a/cool/admin/widgets.py#L184-L234

 https://github.com/007gzs/django-
 cool/blob/f13d52b571eb77c02b062523bc1d79cdeed31b5a/cool/admin/views.py#L14-L76

-- 
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/064.afbd00f24f8de07c5f678cd81d30965b%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2021-04-08 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
-+-
 Reporter:  Jonathan Nye |Owner:  Johannes
 |  Maron
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  autocomplete | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Johannes Maron):

 Hi 007,

 Thank you for reaching out. I understand your frustration. However, the
 `AutocompleteMixin` was never documented, which means it is not considered
 a public API. Private APIs are not subject to deprecation. That is the
 risk you take, when using a private API.

 All that being said, is there anything I could be of help with? If you
 have a 3rd party package, that needs assistance, I would be delighted to
 help.

 Best,
 Joe

-- 
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/064.8bd28601781225dcedd4ab2817563a56%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2021-04-08 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
-+-
 Reporter:  Jonathan Nye |Owner:  Johannes
 |  Maron
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  autocomplete | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by 007):

 AutocompleteMixin is incompatible in django 3.1 and 3.2.  and there is no
 tip like RemovedInDjango32Warning in django 3.1. It's not user friendly.

-- 
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/064.9b8ea438f0259e0b8ee704769d3b514a%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2021-03-18 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
-+-
 Reporter:  Jonathan Nye |Owner:  Johannes
 |  Maron
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  autocomplete | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Carlton Gibson ):

 In [changeset:"0b120f5d649fb21bb898a8b834b6b33e4cdd9504" 0b120f5]:
 {{{
 #!CommitTicketReference repository=""
 revision="0b120f5d649fb21bb898a8b834b6b33e4cdd9504"
 Refs #29138 -- Added extra tests for autocomplete FK to_field variations.
 }}}

-- 
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/064.e3e493af810a901558acf9e59efe83ee%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2021-01-12 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
-+-
 Reporter:  Jonathan Nye |Owner:  Johannes
 |  Maron
 Type:  Bug  |   Status:  closed
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  autocomplete | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by GitHub ):

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


Comment:

 In [changeset:"3071660acfbdf4b5c59457c8e9dc345d5e8894c5" 3071660a]:
 {{{
 #!CommitTicketReference repository=""
 revision="3071660acfbdf4b5c59457c8e9dc345d5e8894c5"
 Fixed #29010, Fixed #29138 -- Added limit_choices_to and to_field support
 to autocomplete fields.

 * Fixed #29010 -- Added limit_choices_to support to autocomplete fields.
 * Fixed #29138 -- Allowed autocomplete fields to target a custom
   to_field rather than the PK.
 }}}

-- 
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/064.69a07ff6475f14bd7e2dfa96b98a0e81%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2021-01-07 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
-+-
 Reporter:  Jonathan Nye |Owner:  Johannes
 |  Maron
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  autocomplete | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Carlton Gibson):

 * 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 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/064.76332d4a1e8ce8d6f49562b71997af8c%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2020-11-27 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Johannes Maron
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Johannes Maron):

 * owner:  Tyler Schwartz => Johannes Maron
 * needs_better_patch:  1 => 0


Comment:

 Since we have a working patch, that's been reviewed a bunch, I'm snatching
 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.96288da39498dec6d20e854f18fff0a6%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2020-05-26 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Tyler Schwartz
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
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/064.c99448bc66e68737bf2c6fa3f538677c%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2019-11-15 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Tyler Schwartz
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Manel Clos):

 We have been using this in Django 2.1.5. As the to_field contains a code,
 it is a valid integer, and no error is produced. This issue should be
 marked as DATA LOSS and be urgently addressed.

-- 
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/064.7ec6bad90a23f4d66a5343e0b77631b6%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2019-10-30 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Tyler Schwartz
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Tyler Schwartz):

 Thanks Joe!

 I appreciate the background you were able to fill in, and I wasn't aware
 that you were so involved in the implementation of Django Admin's
 autocomplete feature.  I am new to Django development, though I am
 interested in helping take this forward if I can be of help, even if it
 takes a while. I don't have any emotional attachment to this current
 patch, other than having used it in production for this past year (yikes!)
 - so if you think a different direction is preferable, I won't be
 offended. I'll take a look at your feedback shortly.

 Regardless, you make a good point - I am working to transition our code
 back to a stable Django release (I inherited this setup when I started
 earlier this year).

 -Tyler

-- 
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/064.26ed3d357ddfb330ef25ae9a934c059c%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2019-10-30 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Tyler Schwartz
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Johannes Hoppe):

 Scratch everything I said. I had another look at #29138. It will require a
 lot of work and probably some mailing list discussion. Therefore, I do
 believe it's worth the effort to fix them separately even if it involves
 revering some parts later.

 I already did a first review of your patch. I'll give it another go
 tomorrow. I believe we can push this over the finish line.

-- 
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/064.ef272b8041d83df85737f1e7a29f96cf%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2019-10-30 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+
 Reporter:  Jonathan Nye   |Owner:  schwtyl
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Johannes Hoppe):

 Hey Tyler,

 thanks for your swift response. I see, I wasn't ware of your background,
 but also didn't mean to offend you. I my comment really was only trying to
 save you some effort. I know first hand that the Django development
 process can be lengthy and demotivating.

 Anyhow, I see where you are coming from, and yes, you shouldn't absolutely
 use a mainstream Django version, to avoid security vulnerabilities.
 Might I suggest to use django-select2 until then? I developed and maintain
 that package, it was the blue print for Django's autocomplete field
 implementation, which I implemented too. It does work slightly different,
 but it will at least allow you to jump to a stable Django release.

 Regarding the patch: As the initial developer of this feature I have an
 elevated interest to solve all bugs, not just this one. That aside – IMHO
 – the best solution actually happens to fix both problems.

 I will do a review of your PR, to give you a bit better feeling of the
 work that would need to be done on the PR to fix only this issue. I'll let
 you decide, if you still think it's worth the effort given that all
 changes would need to be revered with the fix for #29138.

 Best
 -Joe

-- 
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/064.e5c218d50c2b17ed118b909609925ce0%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2019-10-29 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+
 Reporter:  Jonathan Nye   |Owner:  schwtyl
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by schwtyl):

 Joe,

 Constantino developed this patch for the project that I succeeded him on,
 so I'm hardly a random bystander. Everytime our project builds for the
 past year, it pulls it from this GitHub commit, and I'd love to see that
 eventually go back to using an official Django release again. I'm not sure
 how I'd know about 11026, since you didn't link it here. I don't quite
 know that you mean, because this issue *is* #29138. The patch fixes this
 issue - I'm not sure which other issue you're referencing, but can you
 provide feedback on what can be done for this to be accepted? What
 specifically *needs improvement*?

 Thanks,

 Tyler

-- 
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/064.8f2dc4020a20c94069b362a2f6421b8f%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2019-10-29 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+
 Reporter:  Jonathan Nye   |Owner:  schwtyl
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Johannes Hoppe):

 * needs_better_patch:  0 => 1


Comment:

 Hi schwtyl,

 thanks for your commitment. I must admit, I did push this issue aside a
 bit in favor of some other patches I have been working on.

 Sadly, you did base your work on GH@10494 not on GH@11026, therefore my
 critique stays the same. It will only solve this issue but make it harder
 to solve #29138 which is equally important.

 Might I also suggest next time, to comment on the ticket first, before
 fixing someone else's patch. I might save you some trouble.

 Best
 -Joe

-- 
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/064.8c96d26377cab875670ffaf606cdd797%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2019-10-29 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+
 Reporter:  Jonathan Nye   |Owner:  schwtyl
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by schwtyl):

 * cc: schwtyl (added)
 * owner:  Johannes Hoppe => schwtyl
 * has_patch:  0 => 1
 * needs_better_patch:  1 => 0


Comment:

 This work went stale, so I re-forked, upmerged from master, and resolved
 the merge conflict and isort/flake8 issues.  This new PR should be ready
 for review/acceptance.

 [https://github.com/django/django/pull/11990 New PR]

-- 
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/064.8bf09b62fa2759960b5d9d966b11a570%40djangoproject.com.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2019-04-13 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Johannes Hoppe
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Florian Apolloner):

 * needs_better_patch:  0 => 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 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/064.2ee2b002a0f95decc87ea977ca544ca6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2019-03-09 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Johannes Hoppe
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Johannes Hoppe):

 * needs_better_patch:  1 => 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/064.03019d964d2f23ff9b70ed5a766bb297%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2019-02-26 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Johannes Hoppe
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Johannes Hoppe):

 * owner:  Constantino Schillebeeckx => Johannes Hoppe


Comment:

 This has been inactive and I stumbled upon a solution while fixing another
 issue, I am assigning this to me.

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


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-10-15 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
-+-
 Reporter:  Jonathan Nye |Owner:
 |  Constantino Schillebeeckx
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  autocomplete | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * needs_better_patch:  0 => 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 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/064.e22e6df49886406f81da09548a96fcf3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-10-15 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
-+-
 Reporter:  Jonathan Nye |Owner:
 |  Constantino Schillebeeckx
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  autocomplete | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Constantino Schillebeeckx):

 Replying to [comment:10 Johannes Hoppe]:
 > Hey there! Thanks for the work. It is a little hard to review since you
 only posted a branch and I don't know what commits to review. Could you
 maybe assign yourself and open up a pull-request to the Django repo? I
 will gladly do the first review.

 All set: https://github.com/django/django/pull/10494

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


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-10-08 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
-+-
 Reporter:  Jonathan Nye |Owner:
 |  Constantino Schillebeeckx
 Type:  Bug  |   Status:  assigned
Component:  contrib.admin|  Version:  2.0
 Severity:  Normal   |   Resolution:
 Keywords:  autocomplete | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Constantino Schillebeeckx):

 * cc: Constantino Schillebeeckx (added)
 * owner:  (none) => Constantino Schillebeeckx
 * 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 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/064.824cf75654894cdd34d8c69d82443a9e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-10-04 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+
 Reporter:  Jonathan Nye   |Owner:  (none)
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Johannes Hoppe):

 * owner:  Basu Dubey => (none)
 * status:  assigned => new


Comment:

 Replying to [comment:9 Constantino Schillebeeckx]:
 > I've put together a
 [https://github.com/ConstantinoSchillebeeckx/django/tree/fix-29138 bug
 fix] for this.
 >
 > '''Note''' I've been able to update all unit tests and create some new
 ones, however I haven't been able to leverage `to_field_allowed` to
 prevent data leaks. I've tried to implement it (see
 
[https://github.com/ConstantinoSchillebeeckx/django/blob/fix-29138/django/contrib/admin/views/autocomplete.py#L29
 here]), however I can't get it to play nicely with the unit tests. When
 uncommented, the `id_field` isn't properly being considered as
 to_field_allowed. I'm not familiar with this function, so could use some
 help troubleshooting.

 Hey there! Thanks for the work. It is a little hard to review since you
 only posted a branch and I don't know what commits to review. Could you
 maybe assign yourself and open up a pull-request to the Django repo? I
 will gladly do the first review.

 Best
 -Joe

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


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-10-02 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Basu Dubey
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Constantino Schillebeeckx):

 I've put together a
 [https://github.com/ConstantinoSchillebeeckx/django/tree/fix-29138 bug
 fix] for this.

 '''Note''' I've been able to update all unit tests and create some new
 ones, however I haven't been able to leverage `to_field_allowed` to
 prevent data leaks. I've tried to implement it (see
 
[https://github.com/ConstantinoSchillebeeckx/django/blob/fix-29138/django/contrib/admin/views/autocomplete.py#L29
 here]), however I can't get it to play nicely with the unit tests. When
 uncommented, the `id_field` isn't properly being considered as
 to_field_allowed. I'm not familiar with this function, so could use some
 help troubleshooting.

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


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-09-19 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Basu Dubey
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by rkakrik):

 Is there any progress?

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


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-03-19 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Basu Dubey
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Johannes Hoppe):

 Cool, let me know when you have patch. I am happy to review it :)

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


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-03-18 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Basu Dubey
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Tobi):

 * cc: Tobi (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 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/064.57aa6c29a34e2f22aba2d076df82c373%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-03-16 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+--
 Reporter:  Jonathan Nye   |Owner:  Basu Dubey
 Type:  Bug|   Status:  assigned
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Basu Dubey):

 * status:  new => assigned
 * owner:  nobody => Basu Dubey


Comment:

 I wish to take this 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 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/064.df02641dd0e1e0ef7e4fea7b021e6ffb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-02-17 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+
 Reporter:  Jonathan Nye   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Johannes Hoppe):

 Hey Jonathan,

 well that sounds like the perfect opportunity to get into contributing to
 Django.

 Of course the is a contributing guide, but it long. I would recommend to
 read at least the section for new contributors.
 https://docs.djangoproject.com/en/dev/internals/contributing/

 Anyhow, this is how I would go about this:
 Write your test first. You should write a test, that exploits the bug you
 found and fails. You will need to add one at the end anyways, if you start
 with it actually fixing the issue will become a lot easier. You might want
 to add the test here
 `tests.admin_views.test_autocomplete_view.AutocompleteJsonViewTests`.

 Once that is out of the way there is this line in
 `django.contrib.admin.views.autocomplete.AutocompleteJsonView#get`. It
 returns a `JsonResponse` that includes the `obj.pk` at some point. What it
 should return is the value of the `to_field`.  This is where things might
 become tricky. Since there is only once view per model and probably
 multiple other models having foreign keys to that one, you will need to
 get the `to_field` from the relation or pass it as a GET parameter. In the
 latter case you should definitely validate the field to avoid leakage as
 Tim said earlier.

 Anyhow, just get started and let me know if you hit an obstacle and need
 help :)

 Best
 -Joe

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


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-02-16 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+
 Reporter:  Jonathan Nye   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Jonathan Nye):

 Replying to [comment:2 Johannes Hoppe]:
 > Hi Jonathan,
 >
 > very good catch. This is certainly a bug. Custom to_fields should be
 supported.
 >
 > Do you want to fix this yourself or should I?
 >
 > Best
 > -Joe

 Hi Joe,

 I can give it a shot. I haven't contributed to Django before so I would
 appreciate some pointers to get me looking in the right direction.

 What would need to be updated?

 Regards,
 Jonathan

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


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field

2018-02-16 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+
 Reporter:  Jonathan Nye   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Johannes Hoppe):

 Hi Jonathan,

 very good catch. This is certainly a bug. Custom to_fields should be
 supported.

 Do you want to fix this yourself or should I?

 Best
 -Joe

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


Re: [Django] #29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use to_field (was: Admin autocomplete field doesn't support the 'to_field' on Foreign Keys)

2018-02-16 Thread Django
#29138: Add ModelAdmin.autocomplete_fields support for ForeignKeys that use
to_field
---+
 Reporter:  Jonathan Nye   |Owner:  nobody
 Type:  Bug|   Status:  new
Component:  contrib.admin  |  Version:  2.0
 Severity:  Normal |   Resolution:
 Keywords:  autocomplete   | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Tim Graham):

 * cc: Johannes Hoppe (added)
 * stage:  Unreviewed => Accepted


Comment:

 I think the correct solution is to modify `AutocompleteJsonView` to return
 the `to_field` value instead of the primary key. To prevent improper data
 leakage, `ModelAdmin.to_field_allowed()` should be called.

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