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

re-add resource_class deprecation warning #1837

Conversation

matthewhegarty
Copy link
Contributor

Problem

Closes #1823

Re-added the deprecation warnings from v3.

Now if you declare:

class BookAdmin(ImportExportModelAdmin):
    list_display = ("name", "author", "added")
    list_filter = ["categories", "author"]
    resource_class = BookResource
    change_list_template = "core/admin/change_list.html"

You will see the following warning if you enable deprecation warnings, and browse to the import or export page in the UI:

python -X dev ./manage.py runserver

 DeprecationWarning: The 'resource_class' field has been deprecated. Please implement the new 'resource_classes' field

Acceptance Criteria

  • Re-added tests

@coveralls
Copy link

coveralls commented May 15, 2024

Coverage Status

coverage: 100.0%. remained the same
when pulling 8a4c710 on matthewhegarty:issue-1823-readd-resource-deprecation-warnings
into b2479b3 on django-import-export:main.

@matthewhegarty matthewhegarty merged commit 3816ba2 into django-import-export:main May 16, 2024
13 checks passed
@matthewhegarty matthewhegarty deleted the issue-1823-readd-resource-deprecation-warnings branch May 16, 2024 08: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.

resource_class was deprecated and removed, but it still works
2 participants