#16330 closed New feature (fixed)
dumpdata: filter output with given pimary keys
Reported by: | Thomas Güttler | Owned by: | Kevin Brolly |
---|---|---|---|
Component: | Core (Serialization) | Version: | 1.3 |
Severity: | Normal | Keywords: | dumpdata |
Cc: | hv@…, riccardo.magliocchetti@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
This patch adds the --pks option to "dumpdata". You can give a space seperated list
of primary keys. Only the given objects get dumped. Only usefull if you give a ModelName.
Attachments (3)
Change History (20)
by , 13 years ago
Attachment: | dumpdata-primary-keys.patch added |
---|
comment:1 by , 13 years ago
Keywords: | dumpdata added |
---|
comment:2 by , 13 years ago
Easy pickings: | set |
---|
comment:3 by , 13 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Design decision needed |
comment:4 by , 13 years ago
Triage Stage: | Design decision needed → Accepted |
---|
#8429 was a duplicate. There isn't much info on that ticket.
by , 13 years ago
Attachment: | dumpdata-primary-keys2.diff added |
---|
Diffed against latest trunk, coding style cleanup, some code motion in dumpdata to follow how the other options are checked, some rewording of the help text
comment:5 by , 13 years ago
Cc: | added |
---|
comment:6 by , 12 years ago
Owner: | changed from | to
---|
by , 12 years ago
Attachment: | dumpdata-primary-keys3.diff added |
---|
comment:7 by , 12 years ago
Patch needs improvement: | unset |
---|---|
Status: | new → assigned |
Diffed against the latest trunk. Rewording of the help text: " This is mostly useful when dumping only a single model." -> "This option is applied to all apps/models."
https://code.djangoproject.com/attachment/ticket/16330/dumpdata-primary-keys3.diff
PRed here: https://github.com/django/django/pull/344
comment:8 by , 12 years ago
Needs documentation: | set |
---|
comment:11 by , 12 years ago
Updated pull request that instead uses comma seperated string of pk's instead of space seperated. Sanity restored.
https://github.com/django/django/pull/767
comment:12 by , 12 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:13 by , 12 years ago
Triage Stage: | Ready for checkin → Accepted |
---|
Please don't mark your own patches as RFC, have someone else review them. Thanks!
comment:14 by , 11 years ago
Owner: | changed from | to
---|
Grabbing this ticket to fix the issues raised by jacobian in the pull request.
comment:15 by , 11 years ago
Needs documentation: | unset |
---|
Pull request fixing issues raised by jacobian in previous pull request.
comment:16 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Since it's a new feature, I think we need a core developer's approval.
=> DDN.
I think the help text could be improved, especially this part:
Normally only usefull if you give a ModelName
(besides the fact that the correct spelling is "useful"). Also, you must respect Django's coding standards, like spaces around=
and==
, except for keyword arguments.=> Patch needs improvement.