Opened 8 years ago

Closed 7 years ago

#27978 closed New feature (fixed)

Allow loaddata to read data from stdin

Reported by: Aymeric Augustin Owned by: Pavel Kulikov
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

This behavior should be built-in: https://github.com/squareweave/django-loaddata-stdin

It's much easier to work with streams than files on modern platforms, for example:

heroku run -r prod django-admin dumpdata --format=json | heroku run -r staging django-admin loaddata --format=json -

FWIW the workaround looks like heroku run -r staging bash, then cat > data.json, paste with the OS clipboard (which, thankfully, can copy a few MB of data), and then django-admin loaddata data.json -- ugh...

Change History (5)

comment:1 by Tim Graham, 8 years ago

Summary: Support for reading data from stdin in loaddataAllow loaddata to read data from stdin
Triage Stage: UnreviewedAccepted

comment:2 by Pavel Kulikov, 8 years ago

Owner: changed from nobody to Pavel Kulikov
Status: newassigned

comment:3 by Pavel Kulikov, 8 years ago

comment:4 by Pavel Kulikov, 8 years ago

Has patch: set

comment:5 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In af1fa5e7:

Fixed #27978 -- Allowed loaddata to read data from stdin.

Thanks Squareweave for the django-loaddata-stdin project from which this
is adapted.

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