Closed predatell closed 9 years ago
Yep that's certainly not right. It's a legacy of this being removed out of django report builder. Can I ask under what use case you encountered this error? Are you trying to make use of property_filters without using report builder?
https://github.com/burke-software/django-report-builder/blob/master/report_builder/views.py#L107
It might seem logical to move that function to this package - but it's very report builder specific. It even inspects fields from models in report builder - making it pretty useless outside report builder. I'm open to ideas.
This error means that python does not know this function. If you don't want to add this function to this module you should import it from any other module. Please look at this file: report_utils/mixins.py. You will find filter_property function there. But there is no import of this function in that module.
I'm aware of the issue - I'd like to understand your use case more. This project was made to abstract common code from report builder and report scaffold.
I am not using django-report-utils without django-report-builder. I use 2 these packages from pypi. But django-report-utils raise an error.
You gave me description of this function.
https://github.com/burke-software/django-report-builder/blob/master/report_builder/views.py#L107
But I can not understand how do you use it here:
https://github.com/burke-software/django-report-utils/blob/master/report_utils/mixins.py#L284
without importing ???
maybe we should add something like:
from report_builder.views import filter_property
Ah dang - ok I'll look at this soon. Guess the property feature isn't so popular if you're the first to report this.
property was greatly refactored in the report builder 3.x release. Reopen this if there is still a problem though.
File ".../report_utils/mixins.py", line 278, in report_to_list if filter_property(property_filter, val):
NameError: global name 'filter_property' is not defined