[Django] #32802: Ability to generate GenericForeignKey from class properties

2 views
Skip to first unread message

Django

unread,
Jun 1, 2021, 6:20:28 AM6/1/21
to django-...@googlegroups.com
#32802: Ability to generate GenericForeignKey from class properties
-------------------------------------+-------------------------------------
Reporter: Timur | Owner: nobody
Kadyev |
Type: New | Status: new
feature |
Component: | Version: 3.2
contrib.contenttypes |
Severity: Normal | Keywords: GenericForeignKey
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Generating GenericForeignKey currently assumes pass it the names of the
two fields. These fields are default named “content_type” and “object_id”.
Sometimes in practice it is convenient to calculate the values of these
fields (ex. property). In this case, you have to create two additional
fields in which you need to write properties values in order to pass the
GenericForeignKey name validation.
It would be nice to change the GenericForeignKey name validation to accept
not only fields but also properties.

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

Django

unread,
Jun 2, 2021, 1:55:30 AM6/2/21
to django-...@googlegroups.com
#32802: Ability to generate GenericForeignKey from class properties
-------------------------------------+-------------------------------------
Reporter: Timur Kadyev | Owner: nobody
Type: New feature | Status: closed
Component: | Version: 3.2
contrib.contenttypes |
Severity: Normal | Resolution: wontfix
Keywords: GenericForeignKey | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

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


Comment:

Thanks for this ticket, however even if it's feasible I don't think there
would be consensus to add that complexity. You can raise the idea on the
DevelopersMailingList to reach a wider audience and see what other think.

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

Reply all
Reply to author
Forward
0 new messages