Django-filter: ImportError on Django 2.1

Created on 2 Aug 2018  ·  5Comments  ·  Source: carltongibson/django-filter

Hi there, I know that at present only Django 1.11 and 2.0 are supported, anyway I think that you'd like to make it working on 2.1 too sooner or later :smiley: so:

File ".../lib/python3.5/site-packages/django_filters/__init__.py", line 4, in <module>
    from .filterset import FilterSet
  File ".../lib/python3.5/site-packages/django_filters/filterset.py", line 16, in <module>
    from .filters import (Filter, CharFilter, BooleanFilter, BaseInFilter, BaseRangeFilter,
  File ".../lib/python3.5/site-packages/django_filters/filters.py", line 9, in <module>
    from django.db.models.sql.constants import QUERY_TERMS
ImportError: cannot import name 'QUERY_TERMS'

Most helpful comment

Great! Thank you @rpkilby, django-filter 2.0.0 from pypi works great with Django 2.1.
Time to update README with supported Django versions! :fireworks:

All 5 comments

This is the "offending" commit:

https://github.com/django/django/commit/244cc401559e924355cf943b6b8e66ccf2f6da3a#diff-112486a821c7f63d1ab955c6bb2b4db8

Hi @vannitotaro, have you installed the latest 2.x release for django-filter? It should be compatible with Django 2.1

Great! Thank you @rpkilby, django-filter 2.0.0 from pypi works great with Django 2.1.
Time to update README with supported Django versions! :fireworks:

DRF-related (just for other people search reference): https://github.com/philipn/django-rest-framework-filters/issues/226

Right - the 1.0 milestone for django-rest-framework-filters is basically ready. I'm just working on updating documentation. It's grown to the point where it no longer fits comfortably in the readme.

The master branch is effectively stable, although I'd pin at a specific commit until 1.0 is released.

Was this page helpful?
0 / 5 - 0 ratings