[Django] #28898: autocomplete_fields doesn't support OneToOneField

10 views
Skip to first unread message

Django

unread,
Dec 6, 2017, 1:16:31 AM12/6/17
to django-...@googlegroups.com
#28898: autocomplete_fields doesn't support OneToOneField
------------------------------------------+------------------------
Reporter: Lachlan Cannon | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
I'm currently trying to port our projects to Django 2.0, and running into
a problem dropping our old, outdated autocompletes for the new built in
ones, as it appears not to support OneToOne fields.

Looks like the offending line of code is here:
https://github.com/django/django/blob/master/django/contrib/admin/checks.py#L107

--
Ticket URL: <https://code.djangoproject.com/ticket/28898>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 7, 2017, 2:35:11 PM12/7/17
to django-...@googlegroups.com
#28898: Admin check prohibits using a OneToOneField in autocomplete_fields
---------------------------------+------------------------------------

Reporter: Lachlan Cannon | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.0
Severity: Release blocker | 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 Tim Graham):

* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/28898#comment:1>

Django

unread,
Dec 8, 2017, 12:40:56 PM12/8/17
to django-...@googlegroups.com
#28898: Admin check prohibits using a OneToOneField in autocomplete_fields
-------------------------------------+-------------------------------------
Reporter: Lachlan Cannon | Owner: Rodrigo
| Pinheiro Marques de Araújo
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.0

Severity: Release blocker | 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 Rodrigo Pinheiro Marques de Araújo):

* status: new => assigned
* owner: nobody => Rodrigo Pinheiro Marques de Araújo


--
Ticket URL: <https://code.djangoproject.com/ticket/28898#comment:2>

Django

unread,
Dec 8, 2017, 1:57:20 PM12/8/17
to django-...@googlegroups.com
#28898: Admin check prohibits using a OneToOneField in autocomplete_fields
-------------------------------------+-------------------------------------
Reporter: Lachlan Cannon | Owner: Rodrigo
| Pinheiro Marques de Araújo
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.0

Severity: Release blocker | 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 Rodrigo Pinheiro Marques de Araújo):

* Attachment "admin-autocomplete-onetoone.patch" added.

Patch - first version

Django

unread,
Dec 8, 2017, 3:00:20 PM12/8/17
to django-...@googlegroups.com
#28898: Admin check prohibits using a OneToOneField in autocomplete_fields
-------------------------------------+-------------------------------------
Reporter: Lachlan Cannon | Owner: Rodrigo
| Pinheiro Marques de Araújo
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.0

Severity: Release blocker | 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 Rodrigo Pinheiro Marques de Araújo):

Github pull request https://github.com/django/django/pull/9453

--
Ticket URL: <https://code.djangoproject.com/ticket/28898#comment:3>

Django

unread,
Dec 9, 2017, 5:12:39 PM12/9/17
to django-...@googlegroups.com
#28898: Admin check prohibits using a OneToOneField in autocomplete_fields
-------------------------------------+-------------------------------------
Reporter: Lachlan Cannon | Owner: Rodrigo
| Pinheiro Marques de Araújo
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.0

Severity: Release blocker | 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 Raphael Michel):

For everyone else waiting for this: ``SILENCED_SYSTEM_CHECKS =
['admin.E038']`` is a good-enough workaround for now :)

--
Ticket URL: <https://code.djangoproject.com/ticket/28898#comment:4>

Django

unread,
Dec 12, 2017, 12:47:13 PM12/12/17
to django-...@googlegroups.com
#28898: Admin check prohibits using a OneToOneField in autocomplete_fields
-------------------------------------+-------------------------------------
Reporter: Lachlan Cannon | Owner: Rodrigo
| Pinheiro Marques de Araújo
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.0

Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Rodrigo Pinheiro Marques de Araújo):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/28898#comment:5>

Django

unread,
Dec 13, 2017, 2:39:55 AM12/13/17
to django-...@googlegroups.com
#28898: Admin check prohibits using a OneToOneField in autocomplete_fields
-------------------------------------+-------------------------------------
Reporter: Lachlan Cannon | Owner: Rodrigo
| Pinheiro Marques de Araújo
Type: Bug | Status: closed
Component: contrib.admin | Version: 2.0
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"30a389bd7795016d7f48bcda997e5dea5116f9bb" 30a389bd]:
{{{
#!CommitTicketReference repository=""
revision="30a389bd7795016d7f48bcda997e5dea5116f9bb"
Fixed #28898 -- Corrected admin check to allow a OneToOneField in
ModelAdmin.autocomplete_fields.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28898#comment:6>

Django

unread,
Dec 13, 2017, 2:43:33 AM12/13/17
to django-...@googlegroups.com
#28898: Admin check prohibits using a OneToOneField in autocomplete_fields
-------------------------------------+-------------------------------------
Reporter: Lachlan Cannon | Owner: Rodrigo
| Pinheiro Marques de Araújo
Type: Bug | Status: closed
Component: contrib.admin | Version: 2.0

Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"9f39f202abea4daf37f4ad3f9e4c272fd9e4d185" 9f39f202]:
{{{
#!CommitTicketReference repository=""
revision="9f39f202abea4daf37f4ad3f9e4c272fd9e4d185"
[2.0.x] Fixed #28898 -- Corrected admin check to allow a OneToOneField in
ModelAdmin.autocomplete_fields.

Backport of 30a389bd7795016d7f48bcda997e5dea5116f9bb from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/28898#comment:7>

Reply all
Reply to author
Forward
0 new messages