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

Problem with Daterangefilter #30

Open
ramlok1 opened this issue Apr 8, 2022 · 3 comments
Open

Problem with Daterangefilter #30

ramlok1 opened this issue Apr 8, 2022 · 3 comments

Comments

@ramlok1
Copy link

ramlok1 commented Apr 8, 2022

Hello, i love this theme and thank you for the reboot.

I have a problem with the date range. The filter is not displaying

i am importing from jet.filters import DateRangeFilter

@assem-ch
Copy link
Owner

assem-ch commented Apr 8, 2022

Can you write the error you have and may be a screenshot of what you are having

@fgplastina
Copy link

fgplastina commented Jan 10, 2023

Depends on rangefilter version but if you are 0.5.0 or higher you probably are facing this error:

image

I couldn't solve it yet :/

In the previous version I couldn't get any errors, but it just doesn't show on admin.

@GonzaloMachado
Copy link

As @fgplastina mentioned, this is a dependency problem. Starting with version 0.8.0 of django-admin-rangefilter, the file filter was renamed to filters. You can see the relevant commit here.

The dependency on django-admin-rangefilter in Django Jet Reboot, is not specified as a required library. Because of this, when the file was renamed from filter to filters, it caused compatibility issues with Jet Reboot.

Maybe ensure that the right version is installed or have a fallback?:

try:
    from rangefilter.filters import DateRangeFilter as OriginalDateRangeFilter
except ImportError:
    from rangefilter.filter import DateRangeFilter as OriginalDateRangeFilter

Also this exception shouldn't fail silently.

Has anyone found another solution?

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

4 participants