Skip to content

Commit

Permalink
Merge branch 'main' into doc-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhegarty committed Dec 19, 2024
2 parents f43ef3f + 5a237c6 commit 37c0d5e
Show file tree
Hide file tree
Showing 9 changed files with 302 additions and 224 deletions.
4 changes: 3 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
=======
History
=======
UNRELEASED

1.1.0 (2024-12-06)
------------------
* Fix progress bar on changeview for ImportJob and ExportJob
* Improve celery-import-result page
Expand All @@ -13,6 +14,7 @@ UNRELEASED

* Fixed display of progress bar when task is waiting to run (https://github.com/saritasa-nest/django-import-export-extensions/issues/68)
* Improve progress bar style (https://github.com/saritasa-nest/django-import-export-extensions/issues/72)
* Set `default_auto_field` for `import-export-extensions` app to `django.db.models.BigAutoField` (https://github.com/saritasa-nest/django-import-export-extensions/issues/69)

1.0.1 (2024-11-08)
------------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ from .. import resources

@admin.register(models.Book)
class BookAdmin(CeleryImportExportMixin, admin.ModelAdmin):
resource_class = resources.BookResource
resource_classes = [resources.BookResource]
```

Prepare view sets to import/export via API
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Admin models
------------

To perform import/export operations using Celery through Django Admin,
use the ``CeleryImportExportMixin`` in your admin model and set the ``resource_class`` class attribute.
use the ``CeleryImportExportMixin`` in your admin model and set the ``resource_classes`` class attribute.

.. code-block:: python
Expand Down
1 change: 1 addition & 0 deletions import_export_extensions/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class CeleryImportExport(AppConfig):

name = "import_export_extensions"
verbose_name = _("Celery Import/Export")
default_auto_field = "django.db.models.BigAutoField"

def ready(self):
"""Set up default settings."""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Generated by Django 5.1.3 on 2024-12-05 07:16

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
(
"import_export_extensions",
"0007_alter_exportjob_result_alter_importjob_result",
),
]

operations = [
migrations.AlterField(
model_name="exportjob",
name="id",
field=models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
migrations.AlterField(
model_name="importjob",
name="id",
field=models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
]
466 changes: 253 additions & 213 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "django-import-export-extensions"
version = "1.0.1"
version = "1.1.0"
description = "Extend functionality of `django-import-export`"
license = "MIT"
authors = ["Saritasa <[email protected]>"]
Expand Down Expand Up @@ -51,7 +51,7 @@ django-import-export = { extras = ["xls", "xlsx"], version = ">=4.2" }
djangorestframework = "^3.15.2"
# OpenApi auto specs generator
# https://drf-spectacular.readthedocs.io/en/latest/
drf-spectacular = "^0.27.1"
drf-spectacular = ">=0.27.1,<0.29.0"
# Filter querysets dynamically
# https://django-filter.readthedocs.io/en/stable/
django-filter = "^24.3"
Expand Down
10 changes: 5 additions & 5 deletions test_project/fake_app/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.1.1 on 2024-10-14 08:56
# Generated by Django 5.1.3 on 2024-12-05 07:52

import django.db.models.deletion
from django.db import migrations, models
Expand All @@ -15,7 +15,7 @@ class Migration(migrations.Migration):
fields=[
(
"id",
models.AutoField(
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
Expand All @@ -34,7 +34,7 @@ class Migration(migrations.Migration):
fields=[
(
"id",
models.AutoField(
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
Expand All @@ -53,7 +53,7 @@ class Migration(migrations.Migration):
fields=[
(
"id",
models.AutoField(
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
Expand Down Expand Up @@ -89,7 +89,7 @@ class Migration(migrations.Migration):
fields=[
(
"id",
models.AutoField(
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
Expand Down
2 changes: 1 addition & 1 deletion test_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
CELERY_BACKEND = f"redis://{REDIS_HOST}/1"
CELERY_TASK_DEFAULT_QUEUE = "development"

DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

if DEBUG:
INSTALLED_APPS += ("debug_toolbar",)
Expand Down

0 comments on commit 37c0d5e

Please sign in to comment.