﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37195	Add --exclude-system option to dumpdata to skip Django-managed models	abdullah		"Currently, when using `dumpdata` to export application data, users often need to manually exclude Django-managed models such as content types, permissions, admin logs, and sessions.

For example:

{{{
python manage.py dumpdata \
  --exclude contenttypes \
  --exclude auth.Permission \
  --exclude admin.LogEntry \
  --exclude sessions.Session
}}}

This is repetitive and easy to get wrong, especially across projects with different INSTALLED_APPS.

Some of this data is environment-specific or regenerated by Django through migrations and post-migrate handlers. Including it in fixtures can cause conflicts or unwanted records when loading data into another database.

I would like to propose adding a convenience option to dumpdata, for example:


{{{
python manage.py dumpdata --exclude-system
}}}

or possibly:


{{{
python manage.py dumpdata --exclude-internal

}}}

This option would exclude a predefined set of Django-managed/internal models from serialization.

Possible candidates could include:



{{{
- contenttypes.ContentType
- auth.Permission
- admin.LogEntry
- sessions.Session
}}}


The exact list and option name can be discussed.

This would be backwards-compatible because the behavior would only apply when the option is explicitly provided. Existing dumpdata behavior would remain unchanged.
"	New feature	new	Core (Management commands)	6.0	Normal			abdullah	Unreviewed	0	0	0	0	0	0
