Opened 16 years ago
Closed 15 years ago
#12775 closed (fixed)
Enable `dumpdata --exclude app_label.model`
| Reported by: | Johannes Dollinger | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Serialization) | Version: | dev |
| Severity: | Keywords: | dumpdata exclude | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Currently, django-admin.py dumpdata can only exclude whole apps. It would be useful if it supported exclusion of indiviual models with --exclude app_label.model.
Attachments (1)
Change History (7)
comment:1 by , 16 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 16 years ago
by , 15 years ago
| Attachment: | django-12775.diff added |
|---|
Add exclude model support, unit tests, update docs
comment:4 by , 15 years ago
Joshua,
Thanks for a great patch, works perfectly! And as SmileyChris pointed, it is especially useful for dumping/loading data, since it enables dumping omitting only the contenttypes app and the auth.Permission model, and in combination with natural keys it makes it possible to fully automate dumping/loading procedure.
comment:5 by , 15 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:6 by , 15 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Specifically, this would be useful for excluding auto-generated permissions while still allowing
auth.Userto be serialized.