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

Error for proxy models. #25

Open
AMongeMoreno opened this issue Mar 4, 2016 · 1 comment
Open

Error for proxy models. #25

AMongeMoreno opened this issue Mar 4, 2016 · 1 comment

Comments

@AMongeMoreno
Copy link

When trying to generate reports that include a model that is marked as proxy=True, the api seems to fail.

I found the fix (it all comes to using ContentType.objects.get_for_model with the parameter for_concrete_model set to False, so ContentType for proxy models are also retrieved)

Furthermore, there are other related bugs in model introspection util functions, as fields from proxy models are not retrieved using the meta method get_all_field_names() (get_fields() must be used instead). However this fix might break retro compatibility ...

If you want I can make a pull request....

@grantjenks
Copy link
Contributor

I'm happy so long as we support 1.8 (or whatever is LTS). The model introspection api was hacky prior to 1.8 and we've found other bugs trying to support both.

I thought django-report-utils was merged into django-report-builder. @bufke hasn't report_to_csv moved?

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

No branches or pull requests

2 participants