Skip to main content

Dump the entire database to xlsx workbook with a sheet per model

Project description

Export the entire database to an Excel workbook with a sheet per model.

https://travis-ci.org/maykinmedia/django-exportdb.svg?branch=master https://coveralls.io/repos/maykinmedia/django-exportdb/badge.svg https://img.shields.io/pypi/v/django-exportdb.svg

Installation

$ pip install django-exportdb

Add exportdb to INSTALLED_APPS, and make sure that django.contrib.admin is in there as well.

Add

url(r’^admin/exportdb/’, include(‘exportdb.urls’))

to your urls.py, make sure that it comes before url(r’^admin/’, …) if you hook it into the admin.

Configuration

EXPORTDB_EXPORT_CONF

Configures what models and fields are exported. Example:

 EXPORT_CONF = {
    'models': {
        'auth.User': {
            'fields': ('username',),
            'resource_class': 'app.tests.utils.UserResource'
        },
        'auth.Group': {
            'resource_class': 'app.tests.utils.GroupResource'
        },
        'auth.Permission': {
            'fields': ('name',)
        }
    }
}
EXPORTDB_CONFIRM_FORM

Form shown to confirm the export

EXPORTDB_EXPORT_ROOT

The filesystem path where the exports are stored

EXPORTDB_PERMISSION

Who can access the export. By default only superusers have access.

To allow all staff users to use the export add the following to your settings:

EXPORTDB_PERMISSION = rules.is_staff

Project details


Download files

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

Source Distribution

django-exportdb-0.4.4.tar.gz (8.7 kB view details)

Uploaded Source

File details

Details for the file django-exportdb-0.4.4.tar.gz.

File metadata

File hashes

Hashes for django-exportdb-0.4.4.tar.gz
Algorithm Hash digest
SHA256 c90bf0031afb779c252d78caedf35b4e5ef06a36f08241bd06a8047d670c94a0
MD5 c87372e42be0f02aef5235c1ca061045
BLAKE2b-256 65aa107e219613cac3ce4e0d81af4057f03b8ec31312e5df5ad3e85f453e8c42

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page