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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-exportdb-0.4.5.tar.gz
.
File metadata
- Download URL: django-exportdb-0.4.5.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d099b3bbb70b9bed9384eeddcab137ed3fa638fe686455d74d19438cec5f449 |
|
MD5 | 2e246c0ca69bb98418492659412e6571 |
|
BLAKE2b-256 | ab848dd6e1b8ad69cc4dc128fe179ea1f862498caef3998ba77f4f14c5e36c62 |