manage.py dumpdata outputs YAML in unhelpful order
The docs suggest providing initial YAML data in the following format:
- model: myapp.person
pk: 1
fields:
first_name: John
last_name: Lennon
but the manage.py dumpdata outputs YAML in the following form:
- fields: {first_name: John, last_name: Lennon}
model: myapp.person
pk: 1
The fact that this is flow rather than block style YAML is the subject of #11927, but there's another problem, which is that rather than putting the model and PK first (which is most human-readable), dumpdata outputs the fields first.
Change History
(12)
Triage Stage: |
Unreviewed → Accepted
|
Severity: |
→ Normal
|
Type: |
→ Bug
|
Owner: |
changed from nobody to ladyrassilon
|
Owner: |
changed from ladyrassilon to AeroNotix
|
Status: |
new → assigned
|
Has patch: |
set
|
Needs tests: |
set
|
Type: |
Bug → Cleanup/optimization
|
Owner: |
changed from AeroNotix to Tobias Kunze
|
Needs tests: |
unset
|
Version: |
1.1 → master
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
This might be helpful for generating a patch.