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:
committed by
Tim Graham
parent
8f75d21a2e
commit
312eb5cb11
20
tests/fixtures/fixtures/forward_reference_fk.json
vendored
Normal file
20
tests/fixtures/fixtures/forward_reference_fk.json
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"model": "fixtures.naturalkeything",
|
||||
"fields": {
|
||||
"key": "t1",
|
||||
"other_thing": [
|
||||
"t2"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"model": "fixtures.naturalkeything",
|
||||
"fields": {
|
||||
"key": "t2",
|
||||
"other_thing": [
|
||||
"t1"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
23
tests/fixtures/fixtures/forward_reference_m2m.json
vendored
Normal file
23
tests/fixtures/fixtures/forward_reference_m2m.json
vendored
Normal 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"
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user