django-import-export 3.3.6__tar.gz → 3.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django-import-export-3.3.6 → django-import-export-3.3.8}/AUTHORS +1 -0
- {django-import-export-3.3.6/django_import_export.egg-info → django-import-export-3.3.8}/PKG-INFO +1 -1
- {django-import-export-3.3.6 → django-import-export-3.3.8/django_import_export.egg-info}/PKG-INFO +1 -1
- django-import-export-3.3.8/import_export/__init__.py +1 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/admin.py +3 -1
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/mixins.py +21 -1
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/resources.py +16 -12
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/import.html +1 -0
- django-import-export-3.3.6/import_export/__init__.py +0 -1
- {django-import-export-3.3.6 → django-import-export-3.3.8}/LICENSE +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/MANIFEST.in +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/README.rst +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/SOURCES.txt +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/dependency_links.txt +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/not-zip-safe +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/requires.txt +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/top_level.txt +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/exceptions.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/fields.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/formats/__init__.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/formats/base_formats.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/forms.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/instance_loaders.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ar/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ar/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/bg/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/bg/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ca/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ca/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/cs/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/cs/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/de/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/de/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/es/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/es/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/es_AR/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/es_AR/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fa/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fa/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fi/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fi/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fr/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fr/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/it/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/it/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ja/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ja/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ko/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ko/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/kz/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/kz/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/nl/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/nl/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/pl/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/pl/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/pt_BR/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ru/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ru/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/sk/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/sk/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/tr/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/tr/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/zh_Hans/LC_MESSAGES/django.po +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/results.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/signals.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/static/import_export/action_formats.js +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/static/import_export/guess_format.js +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/static/import_export/import.css +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/base.html +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/change_list.html +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/change_list_export.html +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/change_list_export_item.html +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/change_list_import.html +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/change_list_import_export.html +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/change_list_import_item.html +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/export.html +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/resource_fields_list.html +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templatetags/__init__.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templatetags/import_export_tags.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/tmp_storages.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/utils.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/widgets.py +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/setup.cfg +0 -0
- {django-import-export-3.3.6 → django-import-export-3.3.8}/setup.py +0 -0
{django-import-export-3.3.6/django_import_export.egg-info → django-import-export-3.3.8}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: django-import-export
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.8
|
|
4
4
|
Summary: Django application and library for importing and exporting data with included admin integration.
|
|
5
5
|
Home-page: https://github.com/django-import-export/django-import-export
|
|
6
6
|
Author: Bojan Mihelač
|
{django-import-export-3.3.6 → django-import-export-3.3.8/django_import_export.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: django-import-export
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.8
|
|
4
4
|
Summary: Django application and library for importing and exporting data with included admin integration.
|
|
5
5
|
Home-page: https://github.com/django-import-export/django-import-export
|
|
6
6
|
Author: Bojan Mihelač
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.3.8"
|
|
@@ -855,7 +855,9 @@ class ExportMixin(BaseExportMixin, ImportExportMixinBase):
|
|
|
855
855
|
res.get_display_name(),
|
|
856
856
|
[
|
|
857
857
|
field.column_name
|
|
858
|
-
for field in res(
|
|
858
|
+
for field in res(
|
|
859
|
+
**self.get_export_resource_kwargs(request)
|
|
860
|
+
).get_user_visible_fields()
|
|
859
861
|
],
|
|
860
862
|
)
|
|
861
863
|
for res in self.get_export_resource_classes()
|
|
@@ -15,6 +15,11 @@ logger = logging.getLogger(__name__)
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class BaseImportExportMixin:
|
|
18
|
+
"""
|
|
19
|
+
Base mixin for functionality related to importing and exporting via the Admin
|
|
20
|
+
interface.
|
|
21
|
+
"""
|
|
22
|
+
|
|
18
23
|
resource_class = None
|
|
19
24
|
resource_classes = []
|
|
20
25
|
|
|
@@ -63,9 +68,24 @@ class BaseImportExportMixin:
|
|
|
63
68
|
return [self.resource_class]
|
|
64
69
|
|
|
65
70
|
def get_resource_kwargs(self, request, *args, **kwargs):
|
|
66
|
-
|
|
71
|
+
"""
|
|
72
|
+
Return the kwargs which are to be passed to the Resource constructor.
|
|
73
|
+
Can be overridden to provide additional kwarg params.
|
|
74
|
+
|
|
75
|
+
:param request: The request object.
|
|
76
|
+
:param args: Positional arguments.
|
|
77
|
+
:param kwargs: Keyword arguments.
|
|
78
|
+
:returns: The Resource kwargs (by default, is the kwargs passed).
|
|
79
|
+
"""
|
|
80
|
+
return kwargs
|
|
67
81
|
|
|
68
82
|
def get_resource_index(self, form):
|
|
83
|
+
"""
|
|
84
|
+
Return the index of the resource class defined in the form.
|
|
85
|
+
|
|
86
|
+
:param form: The form object.
|
|
87
|
+
:returns: The index of the resource as an int.
|
|
88
|
+
"""
|
|
69
89
|
resource_index = 0
|
|
70
90
|
if form and "resource" in form.cleaned_data:
|
|
71
91
|
try:
|
|
@@ -510,7 +510,7 @@ class Resource(metaclass=DeclarativeMetaclass):
|
|
|
510
510
|
|
|
511
511
|
:param instance: The instance of the object to be persisted.
|
|
512
512
|
:param is_create: A boolean flag to indicate whether this is a new object
|
|
513
|
-
|
|
513
|
+
to be created, or an existing object to be updated.
|
|
514
514
|
:param using_transactions: A flag to indicate whether db transactions are used.
|
|
515
515
|
:param dry_run: A flag to indicate dry-run mode.
|
|
516
516
|
"""
|
|
@@ -646,11 +646,13 @@ class Resource(metaclass=DeclarativeMetaclass):
|
|
|
646
646
|
|
|
647
647
|
Use ``super`` if you want to preserve default handling while overriding
|
|
648
648
|
::
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
649
|
+
|
|
650
|
+
class YourResource(ModelResource):
|
|
651
|
+
def skip_row(self, instance, original,
|
|
652
|
+
row, import_validation_errors=None):
|
|
653
|
+
# Add code here
|
|
654
|
+
return super().skip_row(instance, original, row,
|
|
655
|
+
import_validation_errors=import_validation_errors)
|
|
654
656
|
"""
|
|
655
657
|
if (
|
|
656
658
|
not self._meta.skip_unchanged
|
|
@@ -857,20 +859,22 @@ class Resource(metaclass=DeclarativeMetaclass):
|
|
|
857
859
|
:param dataset: A ``tablib.Dataset``
|
|
858
860
|
|
|
859
861
|
:param raise_errors: Whether errors should be printed to the end user
|
|
860
|
-
|
|
862
|
+
or raised regularly.
|
|
861
863
|
|
|
862
864
|
:param use_transactions: If ``True`` the import process will be processed
|
|
863
|
-
|
|
865
|
+
inside a transaction.
|
|
864
866
|
|
|
865
867
|
:param collect_failed_rows: If ``True`` the import process will collect
|
|
866
|
-
|
|
868
|
+
failed rows.
|
|
867
869
|
|
|
868
870
|
:param rollback_on_validation_errors: If both ``use_transactions`` and
|
|
869
|
-
|
|
870
|
-
|
|
871
|
+
``rollback_on_validation_errors``
|
|
872
|
+
are set to ``True``, the import
|
|
873
|
+
process will be rolled back in
|
|
874
|
+
case of ValidationError.
|
|
871
875
|
|
|
872
876
|
:param dry_run: If ``dry_run`` is set, or an error occurs, if a transaction
|
|
873
|
-
|
|
877
|
+
is being used, it will be rolled back.
|
|
874
878
|
"""
|
|
875
879
|
|
|
876
880
|
if use_transactions is None:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "3.3.6"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/requires.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/formats/base_formats.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templatetags/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|