diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d1ebd1d..9420974 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -71,4 +71,3 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org - diff --git a/LICENSE b/LICENSE index b49930c..c8b4a8a 100644 --- a/LICENSE +++ b/LICENSE @@ -4,10 +4,10 @@ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. diff --git a/docs/api_widgets.rst b/docs/api_widgets.rst index f956ca3..94b69a5 100644 --- a/docs/api_widgets.rst +++ b/docs/api_widgets.rst @@ -28,7 +28,7 @@ Widgets .. autoclass:: import_export.widgets.DurationWidget :members: - + .. autoclass:: import_export.widgets.JSONWidget :members: diff --git a/docs/changelog.rst b/docs/changelog.rst index 7b7568f..012e83c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -17,7 +17,7 @@ Changelog - JSONWidget for jsonb fields (#803) -- Add ExportActionMixin (#809) +- Add ExportActionMixin (#809) - Add Import Export Permissioning #608 (#804) @@ -166,7 +166,7 @@ Changelog - Append rows to Result object via function call to allow overriding (#462) -- Add get_resource_kwargs to allow passing request to resource (#457) +- Add get_resource_kwargs to allow passing request to resource (#457) - Expose Django user to get_export_data() and export() (#447) diff --git a/import_export/mixins.py b/import_export/mixins.py index 5e44c19..abf3a32 100644 --- a/import_export/mixins.py +++ b/import_export/mixins.py @@ -64,7 +64,7 @@ class ExportViewMixin(object): class ExportViewFormMixin(ExportViewMixin, FormView): - def form_valid(self, form): + def form_valid(self, form): formats = self.get_export_formats() file_format = formats[ int(form.cleaned_data['file_format']) diff --git a/import_export/widgets.py b/import_export/widgets.py index 1de4714..99d1351 100644 --- a/import_export/widgets.py +++ b/import_export/widgets.py @@ -269,7 +269,7 @@ class SimpleArrayWidget(Widget): def render(self, value, obj=None): return self.separator.join(six.text_type(v) for v in value) - + class JSONWidget(Widget): """ Widget for a JSON object (especially required for jsonb fields in PostgreSQL database.) @@ -310,7 +310,7 @@ class ForeignKeyWidget(Widget): from import_export import fields, resources from import_export.widgets import ForeignKeyWidget - + class BookResource(resources.ModelResource): author = fields.Field( column_name='author', diff --git a/tests/core/tests/test_admin_integration.py b/tests/core/tests/test_admin_integration.py index 403e1b9..4b73640 100644 --- a/tests/core/tests/test_admin_integration.py +++ b/tests/core/tests/test_admin_integration.py @@ -64,7 +64,7 @@ class ImportExportAdminIntegrationTest(TestCase): response = self.client.post('/admin/core/book/process_import/', data, follow=True) self.assertEqual(response.status_code, 200) - self.assertContains(response, + self.assertContains(response, _('Import finished, with {} new and {} updated {}.').format( 1, 0, Book._meta.verbose_name_plural) ) @@ -101,7 +101,7 @@ class ImportExportAdminIntegrationTest(TestCase): response = self.client.post('/admin/core/book/process_import/', data, follow=True) self.assertEqual(response.status_code, 200) - self.assertContains(response, + self.assertContains(response, _('Import finished, with {} new and {} updated {}.').format( 1, 0, Book._meta.verbose_name_plural) ) diff --git a/tests/database.db b/tests/database.db index 73a7485..a252d0b 100644 Binary files a/tests/database.db and b/tests/database.db differ