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.
Files changed (86) hide show
  1. {django-import-export-3.3.6 → django-import-export-3.3.8}/AUTHORS +1 -0
  2. {django-import-export-3.3.6/django_import_export.egg-info → django-import-export-3.3.8}/PKG-INFO +1 -1
  3. {django-import-export-3.3.6 → django-import-export-3.3.8/django_import_export.egg-info}/PKG-INFO +1 -1
  4. django-import-export-3.3.8/import_export/__init__.py +1 -0
  5. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/admin.py +3 -1
  6. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/mixins.py +21 -1
  7. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/resources.py +16 -12
  8. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/import.html +1 -0
  9. django-import-export-3.3.6/import_export/__init__.py +0 -1
  10. {django-import-export-3.3.6 → django-import-export-3.3.8}/LICENSE +0 -0
  11. {django-import-export-3.3.6 → django-import-export-3.3.8}/MANIFEST.in +0 -0
  12. {django-import-export-3.3.6 → django-import-export-3.3.8}/README.rst +0 -0
  13. {django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/SOURCES.txt +0 -0
  14. {django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/dependency_links.txt +0 -0
  15. {django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/not-zip-safe +0 -0
  16. {django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/requires.txt +0 -0
  17. {django-import-export-3.3.6 → django-import-export-3.3.8}/django_import_export.egg-info/top_level.txt +0 -0
  18. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/exceptions.py +0 -0
  19. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/fields.py +0 -0
  20. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/formats/__init__.py +0 -0
  21. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/formats/base_formats.py +0 -0
  22. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/forms.py +0 -0
  23. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/instance_loaders.py +0 -0
  24. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ar/LC_MESSAGES/django.mo +0 -0
  25. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ar/LC_MESSAGES/django.po +0 -0
  26. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/bg/LC_MESSAGES/django.mo +0 -0
  27. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/bg/LC_MESSAGES/django.po +0 -0
  28. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ca/LC_MESSAGES/django.mo +0 -0
  29. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ca/LC_MESSAGES/django.po +0 -0
  30. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/cs/LC_MESSAGES/django.mo +0 -0
  31. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/cs/LC_MESSAGES/django.po +0 -0
  32. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/de/LC_MESSAGES/django.mo +0 -0
  33. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/de/LC_MESSAGES/django.po +0 -0
  34. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/es/LC_MESSAGES/django.mo +0 -0
  35. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/es/LC_MESSAGES/django.po +0 -0
  36. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/es_AR/LC_MESSAGES/django.mo +0 -0
  37. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/es_AR/LC_MESSAGES/django.po +0 -0
  38. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fa/LC_MESSAGES/django.mo +0 -0
  39. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fa/LC_MESSAGES/django.po +0 -0
  40. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fi/LC_MESSAGES/django.mo +0 -0
  41. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fi/LC_MESSAGES/django.po +0 -0
  42. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fr/LC_MESSAGES/django.mo +0 -0
  43. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/fr/LC_MESSAGES/django.po +0 -0
  44. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/it/LC_MESSAGES/django.mo +0 -0
  45. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/it/LC_MESSAGES/django.po +0 -0
  46. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ja/LC_MESSAGES/django.mo +0 -0
  47. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ja/LC_MESSAGES/django.po +0 -0
  48. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ko/LC_MESSAGES/django.mo +0 -0
  49. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ko/LC_MESSAGES/django.po +0 -0
  50. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/kz/LC_MESSAGES/django.mo +0 -0
  51. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/kz/LC_MESSAGES/django.po +0 -0
  52. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/nl/LC_MESSAGES/django.mo +0 -0
  53. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/nl/LC_MESSAGES/django.po +0 -0
  54. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/pl/LC_MESSAGES/django.mo +0 -0
  55. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/pl/LC_MESSAGES/django.po +0 -0
  56. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  57. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/pt_BR/LC_MESSAGES/django.po +0 -0
  58. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ru/LC_MESSAGES/django.mo +0 -0
  59. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/ru/LC_MESSAGES/django.po +0 -0
  60. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/sk/LC_MESSAGES/django.mo +0 -0
  61. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/sk/LC_MESSAGES/django.po +0 -0
  62. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/tr/LC_MESSAGES/django.mo +0 -0
  63. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/tr/LC_MESSAGES/django.po +0 -0
  64. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  65. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/locale/zh_Hans/LC_MESSAGES/django.po +0 -0
  66. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/results.py +0 -0
  67. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/signals.py +0 -0
  68. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/static/import_export/action_formats.js +0 -0
  69. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/static/import_export/guess_format.js +0 -0
  70. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/static/import_export/import.css +0 -0
  71. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/base.html +0 -0
  72. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/change_list.html +0 -0
  73. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/change_list_export.html +0 -0
  74. {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
  75. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/change_list_import.html +0 -0
  76. {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
  77. {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
  78. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/export.html +0 -0
  79. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templates/admin/import_export/resource_fields_list.html +0 -0
  80. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templatetags/__init__.py +0 -0
  81. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/templatetags/import_export_tags.py +0 -0
  82. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/tmp_storages.py +0 -0
  83. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/utils.py +0 -0
  84. {django-import-export-3.3.6 → django-import-export-3.3.8}/import_export/widgets.py +0 -0
  85. {django-import-export-3.3.6 → django-import-export-3.3.8}/setup.cfg +0 -0
  86. {django-import-export-3.3.6 → django-import-export-3.3.8}/setup.py +0 -0
@@ -145,3 +145,4 @@ The following is a list of much appreciated contributors:
145
145
  * bgelov (Oleg Belov)
146
146
  * EricOuma (Eric Ouma)
147
147
  * ZibingZhang (Zibing Zhang)
148
+ * ulliholtgrave
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-import-export
3
- Version: 3.3.6
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č
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-import-export
3
- Version: 3.3.6
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(model=self.model).get_user_visible_fields()
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
- return {}
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
- to be created, or an existing object to be updated.
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
- class YourResource(ModelResource):
650
- def skip_row(self, instance, original, row, import_validation_errors=None):
651
- # Add code here
652
- return super().skip_row(instance, original, row,
653
- import_validation_errors=import_validation_errors)
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
- or raised regularly.
862
+ or raised regularly.
861
863
 
862
864
  :param use_transactions: If ``True`` the import process will be processed
863
- inside a transaction.
865
+ inside a transaction.
864
866
 
865
867
  :param collect_failed_rows: If ``True`` the import process will collect
866
- failed rows.
868
+ failed rows.
867
869
 
868
870
  :param rollback_on_validation_errors: If both ``use_transactions`` and
869
- ``rollback_on_validation_errors`` are set to ``True``, the import process will
870
- be rolled back in case of ValidationError.
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
- is being used, it will be rolled back.
877
+ is being used, it will be rolled back.
874
878
  """
875
879
 
876
880
  if use_transactions is None:
@@ -40,6 +40,7 @@
40
40
  {% csrf_token %}
41
41
 
42
42
  {% include "admin/import_export/resource_fields_list.html" with import_or_export="import" %}
43
+ {% block import_form_additional_info %}{% endblock %}
43
44
 
44
45
  {% block form_detail %}
45
46
  <fieldset class="module aligned">
@@ -1 +0,0 @@
1
- __version__ = "3.3.6"