Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[Django] #23268: Fixtures: Natural Key support for Generic Foreign Keys

23 views
Skip to first unread message

Django

unread,
Aug 11, 2014, 3:13:24 AM8/11/14
to django-...@googlegroups.com
#23268: Fixtures: Natural Key support for Generic Foreign Keys
-------------------------------------+-------------------------------------
Reporter: eskhool | Owner: nobody
Type: Bug | Status: new
Component: Core | Version: 1.6
(Serialization) | Keywords: natural generic
Severity: Normal | fixtures
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Currently, the natural key support is incomplete when it comes to generic
foreign keys (I say bug, you may think feature). One cannot remove PKs
from any object that has a generic foreign key reference limiting the
whole idea of having natural keys to direct foreign keys only. Since
generic foreign keys can inherently have an entry with any model, PKs have
to be dumped for all models necessitating the maintenance of updated PKs

There is a great answer by someone who has done the leg work for figuring
out what is required.
http://stackoverflow.com/questions/11159377/is-it-possible-to-use-a
-natural-key-for-a-genericforeignkey-in-django

Creating a ticket to document it here and see what the interest is for the
same.

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

Django

unread,
Sep 14, 2014, 12:08:06 PM9/14/14
to django-...@googlegroups.com
#23268: Fixtures: Natural Key support for Generic Foreign Keys
-------------------------------------+-------------------------------------
Reporter: eskhool | Owner: nobody
Type: Bug | Status: new
Component: Core | Version: 1.6
(Serialization) | Resolution:
Severity: Normal | Triage Stage:
Keywords: natural generic | Unreviewed
fixtures | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by brillgen):

* cc: dev@… (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


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

Django

unread,
Sep 28, 2014, 8:50:39 AM9/28/14
to django-...@googlegroups.com
#23268: Fixtures: Natural Key support for Generic Foreign Keys
-------------------------------------+-------------------------------------
Reporter: eskhool | Owner: nobody
Type: Bug | Status: new
Component: Core | Version: 1.6
(Serialization) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: natural generic | Needs documentation: 0
fixtures | Patch needs improvement: 0
Has patch: 0 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* stage: Unreviewed => Accepted


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

Django

unread,
Dec 26, 2016, 7:06:09 AM12/26/16
to django-...@googlegroups.com
#23268: Fixtures: Natural Key support for Generic Foreign Keys
-------------------------------------+-------------------------------------
Reporter: Anshuman Aggarwal | Owner: Guillaume
| Thomas
Type: Bug | Status: assigned

Component: Core | Version: 1.6
(Serialization) |
Severity: Normal | Resolution:
Keywords: natural generic | Triage Stage: Accepted
fixtures |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Guillaume Thomas):

* owner: nobody => Guillaume Thomas
* status: new => assigned


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

Django

unread,
Dec 26, 2016, 10:45:55 AM12/26/16
to django-...@googlegroups.com
#23268: Fixtures: Natural Key support for Generic Foreign Keys
-------------------------------------+-------------------------------------
Reporter: Anshuman Aggarwal | Owner: Guillaume
| Thomas
Type: Bug | Status: assigned
Component: Core | Version: 1.6
(Serialization) |
Severity: Normal | Resolution:
Keywords: natural generic | Triage Stage: Ready for
fixtures | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Guillaume Thomas):

* has_patch: 0 => 1
* stage: Accepted => Ready for checkin


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

Django

unread,
Dec 26, 2016, 11:24:57 AM12/26/16
to django-...@googlegroups.com
#23268: Fixtures: Natural Key support for Generic Foreign Keys
-------------------------------------+-------------------------------------
Reporter: Anshuman Aggarwal | Owner: Guillaume
| Thomas
Type: Bug | Status: assigned
Component: Core | Version: 1.6
(Serialization) |
Severity: Normal | Resolution:
Keywords: natural generic | Triage Stage: Accepted
fixtures |

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Ready for checkin => Accepted


Comment:

"Ready for checkin" is set by a patch reviewer, not the patch author.

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

Django

unread,
Jun 15, 2017, 4:05:25 PM6/15/17
to django-...@googlegroups.com
#23268: Fixtures: Natural Key support for Generic Foreign Keys
-------------------------------------+-------------------------------------
Reporter: Anshuman Aggarwal | Owner: Guillaume
| Thomas
Type: Bug | Status: assigned
Component: Core | Version: 1.6
(Serialization) |
Severity: Normal | Resolution:
Keywords: natural generic | Triage Stage: Accepted
fixtures |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1


Comment:

As I mentioned on the pull request, it doesn't seem like a good separation
of concerns to modify the "core" serializers for a "contrib" field.
Unfortunately, I haven't studied the problem enough to suggest an
alternate solution.

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

Django

unread,
Apr 13, 2019, 8:26:38 AM4/13/19
to django-...@googlegroups.com
#23268: Fixtures: Natural Key support for Generic Foreign Keys
-------------------------------------+-------------------------------------
Reporter: Anshuman Aggarwal | Owner: Guillaume
| Thomas
Type: Bug | Status: assigned
Component: Core | Version: 1.6
(Serialization) |
Severity: Normal | Resolution:
Keywords: natural generic | Triage Stage: Accepted
fixtures |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ian Foote):

* cc: Ian Foote (added)


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

Django

unread,
May 14, 2025, 9:01:54 AMMay 14
to django-...@googlegroups.com
#23268: Fixtures: Natural Key support for Generic Foreign Keys
-------------------------------------+-------------------------------------
Reporter: Anshuman Aggarwal | Owner: (none)
Type: Bug | Status: new
Component: Core | Version: 1.6
(Serialization) |
Severity: Normal | Resolution:
Keywords: natural generic | Triage Stage: Accepted
fixtures |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* owner: Guillaume Thomas => (none)
* status: assigned => new

--
Ticket URL: <https://code.djangoproject.com/ticket/23268#comment:8>
Reply all
Reply to author
Forward
0 new messages