1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #26291 -- Allowed loaddata to handle forward references in natural_key fixtures.

This commit is contained in:
Peter Inglesby
2018-07-13 22:54:47 +01:00
committed by Tim Graham
parent 8f75d21a2e
commit 312eb5cb11
12 changed files with 352 additions and 25 deletions

View File

@@ -0,0 +1,20 @@
[
{
"model": "fixtures.naturalkeything",
"fields": {
"key": "t1",
"other_thing": [
"t2"
]
}
},
{
"model": "fixtures.naturalkeything",
"fields": {
"key": "t2",
"other_thing": [
"t1"
]
}
}
]

View File

@@ -0,0 +1,23 @@
[
{
"model": "fixtures.naturalkeything",
"fields": {
"key": "t1",
"other_things": [
["t2"], ["t3"]
]
}
},
{
"model": "fixtures.naturalkeything",
"fields": {
"key": "t2"
}
},
{
"model": "fixtures.naturalkeything",
"fields": {
"key": "t3"
}
}
]