Skip to main content

Export one or more objects and their related objects. Allows for fine-tuned control over which related objects are exported.

Project description


  1. Installation is easy using pip.

    $ pip install django-objectdump

  3. Optionally add configuration information (OBJECTDUMP_SETTINGS)


        'app.model': {
            'ignore': False,
            'fk_fields': True,  # or False, or ['whitelist', 'of', 'fks']
            'm2m_fields': True,  # or False, or ['whitelist', 'of', 'm2m fields']
            'addl_relations': []  # callable or 'othermodel_set.all' strings
If True, always ignore this model. Acts as if you used --exclude with this model.
If False, do not include related objects through foreign keys. Otherwise, a white-list of foreign keys to include related objects.
If False, do not include related objects through many-to-many fields. Otherwise, a white-list of many-to-many field names to include related objects.
A list of callables, which get passed an object, or strings in Django template syntax ('author_set.all.0' becomes 'object.author_set.all.0' and evaluates to object.author_set.all()[0])



Default: json

Specifies the output serialization format for fixtures. Options depend on SERIALIZATION_MODULES settings. xml and json and yaml are built-in.


Default: None

Specifies the indent level to use. The default will not do any pretty-printing or indenting of content.



Nominates a specific database to dump fixtures from. Defaults to the “default” database.

-e, --exclude

Default: []

An appname or appname.ModelName to exclude (use multiple --exclude to exclude multiple apps/models).

-n, --natural

Default: False

Use natural keys if they are available.


Default: None

Max depth related objects to get. The initial object specified is considered level 0. The default will get all objects.


Default: None

Max number of related objects to get. Default gets all related objects.

-i, --include

Default: all

An appname or appname.ModelName to whitelist related objects included in the export (use multiple --include to include multiple apps/models).


Default: 'int'

The natural type of the id(s) specified. Options are: int, unicode, long


Default: False

Output debug information. Shows what related objects each object generates. Use with --verbosity 2 to also see which fields are the link.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-objectdump, version 0.5.2
Filename, size File type Python version Upload date Hashes
Filename, size django_objectdump-0.5.2-py2-none-any.whl (16.3 kB) File type Wheel Python version 2.7 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page