Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

maykinmedia/django-exportdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Export DB

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

image

image

image

image

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published