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
'list' object is not callable #1522
Comments
Resolve it by overriding
It may not be an optimal solution, but just removed the error from screen and exported csv file. |
Can you provide a stack trace of this issue? Does it solve your issue if you override class BooksAdmin(ImportExportModelAdmin, ImportExportActionModelAdmin, BaseAdmin):
resource_class = [BooksResource]
def get_list_display(self, request):
return BaseAdmin.list_display + ('name', 'author', 'published', 'price', 'categories',) |
@matthewhegarty I have run into similar problem. I hope this helps you let me know you if you need any further information
|
@matthewhegarty I figured out the above error. that is caused when you pass list to resource_class instead of resource_classes. There should be a type casting enforcing to avoid this kind of errors. |
ok thanks for the report - will take a look |
Hey @matthewhegarty , So recently i have noticed similar error again but this time i made everything correct.I am not sure whats triggering this.Is that i am missing any variable initialization. Resource
Admin model
Register
Error Log
|
Should this be |
You are right. my bad |
Describe the bug
I tried to impliment admin class for Books table along with ImportExportModelAdmin and ImportExportActionModelAdmin. while exporting selected records from admin panel i got the error.
To Reproduce
Steps to reproduce the behavior:
Versions (please complete the following information):
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: