Opened 7 years ago

Last modified 3 years ago

#11929 assigned Cleanup/optimization

manage.py dumpdata outputs YAML in unhelpful order

Reported by: sampablokuper Owned by: AeroNotix
Component: Core (Serialization) Version: 1.1
Severity: Normal Keywords:
Cc: sam.kuper@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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 (8)

comment:1 Changed 7 years ago by sampablokuper

This might be helpful for generating a patch.

comment:2 Changed 7 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

comment:3 Changed 6 years ago by Julien Phalip

Severity: Normal
Type: Bug

comment:4 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:6 Changed 4 years ago by ladyrassilon

Owner: changed from nobody to ladyrassilon

comment:7 Changed 3 years ago by AeroNotix

Owner: changed from ladyrassilon to AeroNotix
Status: newassigned

comment:8 Changed 3 years ago by Tim Graham

Has patch: set
Needs tests: set
Type: BugCleanup/optimization

The current PR needs a test.

Note: See TracTickets for help on using tickets.
Back to Top