diff --git a/data_management/resources.py b/data_management/resources.py new file mode 100644 index 00000000..e3a1e34e --- /dev/null +++ b/data_management/resources.py @@ -0,0 +1,6 @@ +from import_export import resources +from .models import DataProduct + +class DataProductResource(resources.ModelResource): + class Meta: + model = DataProduct diff --git a/drams/local-settings.py b/drams/local-settings.py index 5726345f..8aa78048 100644 --- a/drams/local-settings.py +++ b/drams/local-settings.py @@ -1,5 +1,9 @@ from .base_settings import * +INSTALLED_APPS += ['import_export', ] + MIDDLEWARE += ['whitenoise.middleware.WhiteNoiseMiddleware', ] STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage' + +IMPORT_EXPORT_USE_TRANSACTIONS = True