#7254 closed (fixed)
patch: exclude apps from dumpdir
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Keywords: | ||
Cc: | "Russell, Keith-Magee", <freakboy3742@…> | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
To help deal with loaddata issues caused by a single app (like http://code.djangoproject.com/ticket/7052 ) this adds support for --exclude to dumpdata. (use multiple --exclude to exclude multiple apps.)
It also adds --verbosity which shows lets you see what apps have been excluded, what will be processed, and what is being processed as the data is being dumped. It sends this to stderr because dumpdata currently sends to stdout.
If stderr is poor form, I was considering adding a --file option so that sdtout could be used for verbosity messages. but that seemed just as wrong as stderr, and stderr was much easier to code.
Attachments (2)
Change History (9)
by , 17 years ago
Attachment: | dumpdata.py.diff added |
---|
comment:1 by , 16 years ago
Patch needs improvement: | set |
---|
by , 16 years ago
Attachment: | dumpdata.py.2.diff added |
---|
removed unnecessary changes, s/print stderr/sys.stderr.write
comment:2 by , 16 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:4 by , 16 years ago
Triage Stage: | Design decision needed → Accepted |
---|
This is a reasonable idea, especially as a workaround for #7052 issues. I can't review the patch right now, but I should have a chance in the near future.
comment:5 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 16 years ago
What happened to
make_option('-v', '--verbosity', action='store', dest='verbosity', default='0',
?
comment:7 by , 16 years ago
On looking at the patch, I couldn't see the value in the output being provided by verbosity - it was useful output for debugging the command itself, but I didn't see the value for end users.
There are unnecessary changes in the patch. Please have them removed.
Also, the direct usage of stderr is layer violation, AFAICT.