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

Django 1.11 Compatibility #712

Closed
niknokseyer opened this issue May 12, 2017 · 4 comments
Closed

Django 1.11 Compatibility #712

niknokseyer opened this issue May 12, 2017 · 4 comments

Comments

@niknokseyer
Copy link

I upgrade to Django 1.11 but I think there's some compatibility issues for the django-filter, I'm getting this error when I try to run the server:

ImportError: Could not import 'django_filters.rest_framework.DjangoFilterBackend' for API setting 'DEFAULT_FILTER_BACKENDS'. ImportError: cannot import name 'flatatt'.

@carltongibson
Copy link
Owner

Version 1.0.2 added Django 1.11 compatibility, and we're testing against that in Travis

E.g. https://travis-ci.org/carltongibson/django-filter/jobs/227705729#L218

Can you check your versions?

@mheppner
Copy link

mheppner commented May 13, 2017

I might need to open a new issue for this, but I'm having a problem after upgrading to Django 1.11 (with django-filter==1.0.2, djangorestframework==3.6.3, django-crispy-forms==1.6.1). I get a Programming Error: can't use a named cursor outside of transactions whenever an API view set has a filter_fields set. The traceback is happening on line 3, filter.form.as_p (similar issue when I turn crispy forms back on):

<h2>{% trans "Field filters" %}</h2>
<form class="form" action="" method="get">
    {{ filter.form.as_p }}
    <button type="submit" class="btn btn-primary">{% trans "Submit" %}</button>
</form>

Do you want a new issue for this?

Edit This happens if a filter_field is pointing to a foreign key field. I was using it to filter by __isnull.

@carltongibson
Copy link
Owner

Do you want a new issue for this?

Yes please. If you can isolate the failure in a test case that would be awesome!

@mheppner
Copy link

Ok it's #713. As for the original issue reported here, it's a duplicate of #673, which has already been fixed.

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

3 participants