Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Django Admin integration with original package #11

Merged
merged 22 commits into from
Sep 11, 2023

Conversation

NikAzanov
Copy link
Contributor

Prior to this, all admin models and admin templates were rewritten from the original package and didn't use inheritance. In this PR I tried to reuse the django-import-export code by inheritance to reduce the amount of code and make it easier to make changes.

In this PR:

  • Improve GitHub workflow name
  • Get rid of DjangoObjectActions and implement default django admin action instead (Maybe later we can extend this)
  • Use mixins.BaseExportMixin, mixins.BaseImportMixin and admin.ImportExportMixinBase from original package for celery admin mixins
  • Use admin/import_export/ templates instead of copies in admin/import_export_ext/
  • Small improvements:
    • Fix static folder name
    • Fix invoke command to run celery
    • Fix progress bar widget
    • Rename filter_class to filterset_class
    • Add cancel_job action for exporting

* Remove django_object_actions from test app config
* Revert to psycopg2-binary
@NikAzanov NikAzanov force-pushed the improve-original-package-integration branch from 4a46a2e to 4d22194 Compare August 25, 2023 04:49
.github/workflows/checks.yml Outdated Show resolved Hide resolved
import_export_extensions/admin/mixins/export_mixin.py Outdated Show resolved Hide resolved
import_export_extensions/models/export_job.py Outdated Show resolved Hide resolved
Base automatically changed from update-docs to main September 4, 2023 08:39
@NikAzanov NikAzanov linked an issue Sep 6, 2023 that may be closed by this pull request
import_export_extensions/admin/mixins/import_mixin.py Outdated Show resolved Hide resolved
@@ -43,14 +43,15 @@ To install `django-import-export-extensions`, run this command in your terminal:

$ pip install django-import-export-extensions

Add `import_export_extensions` to INSTALLED_APPS
Add `import_export` and `import_export_extensions` to INSTALLED_APPS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mention in other PR's I think we should use double quotes instead of single ones

@NikAzanov NikAzanov force-pushed the improve-original-package-integration branch from c1496b7 to 2711f57 Compare September 11, 2023 06:11
@NikAzanov NikAzanov merged commit b97da75 into main Sep 11, 2023
13 checks passed
@NikAzanov NikAzanov deleted the improve-original-package-integration branch September 11, 2023 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't open Import jobs page in django-admin
3 participants