[Django] #36151: editable GenericForeignKey

26 views
Skip to first unread message

Django

unread,
Jan 28, 2025, 7:00:23 AM1/28/25
to django-...@googlegroups.com
#36151: editable GenericForeignKey
---------------------------+-----------------------------------------
Reporter: James Pic | Type: Uncategorized
Status: new | Component: Uncategorized
Version: 5.1 | 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
---------------------------+-----------------------------------------
https://code.djangoproject.com/ticket/35224 made GFK a Field with hard-
coded editable=False

This breaks this very nice feature in Django 5.1 https://django-
autocomplete-light.readthedocs.io/en/master/gfk.html

With exception: cannot be specified for TModel model form as it is a non-
editable field. Check fields/fieldsets/exclude attributes of class
TestAdmin

While I understand this is an interesting default protection for users, it
would also be nice if Django would keep on allowing users to create their
form fields for GFK if they want to, as they could until Django 5.0
--
Ticket URL: <https://code.djangoproject.com/ticket/36151>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 28, 2025, 7:00:47 AM1/28/25
to django-...@googlegroups.com
#36151: editable GenericForeignKey
-------------------------------------+-------------------------------------
Reporter: James Pic | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: | Version: 5.1
contrib.contenttypes |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by James Pic):

* component: Uncategorized => contrib.contenttypes
* type: Uncategorized => Cleanup/optimization

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

Django

unread,
Jan 28, 2025, 7:05:42 AM1/28/25
to django-...@googlegroups.com
#36151: editable GenericForeignKey
-------------------------------------+-------------------------------------
Reporter: James Pic | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: | Version: 5.1
contrib.contenttypes |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by James Pic):

* has_patch: 0 => 1

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

Django

unread,
Jan 28, 2025, 7:06:24 AM1/28/25
to django-...@googlegroups.com
#36151: editable GenericForeignKey
-------------------------------------+-------------------------------------
Reporter: James Pic | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: | Version: 5.1
contrib.contenttypes |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by James Pic):

This fixes the problem enough https://github.com/django/django/pull/19110

If you want agree to any fix of this kind I'll gladly add a test.

TYIA for your feedback
--
Ticket URL: <https://code.djangoproject.com/ticket/36151#comment:3>

Django

unread,
Jan 28, 2025, 7:50:12 AM1/28/25
to django-...@googlegroups.com
#36151: editable GenericForeignKey
-------------------------------------+-------------------------------------
Reporter: James Pic | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: | Version: 5.1
contrib.contenttypes |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by James Pic):

In case any dal users stumbles on this, there's a documented monkey patch
meanwhile this is fixed, or in case this won't be fixed
https://github.com/yourlabs/django-autocomplete-
light/commit/2e8933d2473409a19c624610800e077d3fbf1074
--
Ticket URL: <https://code.djangoproject.com/ticket/36151#comment:4>
Reply all
Reply to author
Forward
0 new messages