Skip to content

Commit

Permalink
Merge pull request #498 from edx/tuchfarber/ent-2015
Browse files Browse the repository at this point in the history
Change DjangoFilterBackend import location
  • Loading branch information
tuchfarber authored Jun 12, 2019
2 parents b96f6e9 + 49850f9 commit e5ba9a0
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 35 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Change Log
Unreleased
----------

[1.6.9] - 2019-06-12
--------------------

* Install django-filter so this app is compatible with newer DRF packages.

[1.6.8] - 2019-06-11
--------------------

Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

from __future__ import absolute_import, unicode_literals

__version__ = "1.6.8"
__version__ = "1.6.9"

default_app_config = "enterprise.apps.EnterpriseConfig" # pylint: disable=invalid-name
5 changes: 3 additions & 2 deletions enterprise/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from logging import getLogger
from smtplib import SMTPException

from django_filters.rest_framework import DjangoFilterBackend
from edx_rbac.decorators import permission_required
from edx_rest_framework_extensions.auth.bearer.authentication import BearerAuthentication
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
Expand Down Expand Up @@ -75,7 +76,7 @@ class EnterpriseModelViewSet(EnterpriseViewSet):
Base class for attribute and method definitions common to all view sets.
"""

filter_backends = (filters.OrderingFilter, filters.DjangoFilterBackend, UserFilterBackend,)
filter_backends = (filters.OrderingFilter, DjangoFilterBackend, UserFilterBackend,)
permission_classes = (permissions.IsAuthenticated, permissions.DjangoModelPermissions,)
USER_ID_FILTER = 'id'

Expand Down Expand Up @@ -228,7 +229,7 @@ class EnterpriseCustomerUserViewSet(EnterpriseReadWriteModelViewSet):
"""

queryset = models.EnterpriseCustomerUser.objects.all()
filter_backends = (filters.OrderingFilter, filters.DjangoFilterBackend, EnterpriseCustomerUserFilterBackend)
filter_backends = (filters.OrderingFilter, DjangoFilterBackend, EnterpriseCustomerUserFilterBackend)

FIELDS = (
'enterprise_customer', 'user_id',
Expand Down
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

django-object-actions==0.10.0 # Object actions in Django admin
djangorestframework-xml==1.3.0
django-filter
django-multi-email-field==0.5.1 # Multi email input field in Django admin
jsondiff==1.1.1 # Used to detect content metadata changes
django-countries==4.6.1
Expand Down
15 changes: 9 additions & 6 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
-e git+https://github.com/edx/[email protected]#egg=tincan==0.0.5.py.35
amqp==1.4.9 # via kombu
aniso8601==6.0.0
aniso8601==7.0.0
anyjson==0.3.3 # via kombu
argparse==1.4.0 # via caniusepython3
asn1crypto==0.24.0 # via cryptography
Expand Down Expand Up @@ -45,7 +45,7 @@ djangorestframework-oauth==1.1.0
djangorestframework-xml==1.3.0
djangorestframework==3.6.3
edx-django-oauth2-provider==1.3.5
edx-django-utils==1.0.3 # via edx-drf-extensions
edx-django-utils==1.0.5 # via edx-drf-extensions
edx-drf-extensions==2.3.1
edx-i18n-tools==0.4.8
edx-lint==1.3.0
Expand All @@ -59,7 +59,7 @@ future==0.17.1 # via pyjwkest
futures==3.1.1
html5lib==1.0.1
idna==2.8 # via cryptography, requests
importlib-metadata==0.17 # via pluggy
importlib-metadata==0.18 # via pluggy
inflect==2.1.0 # via jinja2-pluralize
ipaddress==1.0.22 # via cryptography
isort==4.3.20
Expand All @@ -77,7 +77,7 @@ path.py==8.2.1
pathlib2==2.3.3 # via importlib-metadata
pbr==5.2.1 # via stevedore
pillow==5.4.1
pip-tools==3.7.0
pip-tools==3.8.0
pkginfo==1.5.0.1 # via twine
pluggy==0.12.0 # via tox
polib==1.1.0 # via edx-i18n-tools
Expand All @@ -99,7 +99,7 @@ pyparsing==2.4.0 # via packaging
python-dateutil==2.8.0
python-slugify==3.0.2 # via code-annotations
pytz==2019.1
pyyaml==5.1 # via code-annotations, edx-i18n-tools
pyyaml==5.1.1 # via code-annotations, edx-i18n-tools
requests-toolbelt==0.9.1 # via twine
requests==2.21.0
rest-condition==1.0.3 # via edx-drf-extensions
Expand All @@ -112,7 +112,7 @@ six==1.12.0 # via astroid, bleach, cryptography, diff-cover, edx-d
slumber==0.7.1 # via edx-rest-api-client
snowballstemmer==1.2.1 # via pydocstyle
stevedore==1.30.1 # via code-annotations, edx-opaque-keys
testfixtures==6.8.2
testfixtures==6.9.0
text-unidecode==1.2 # via python-slugify
toml==0.10.0 # via tox
tox-battery==0.5.1
Expand All @@ -126,3 +126,6 @@ webencodings==0.5.1 # via html5lib
wheel==0.33.4
wrapt==1.11.1 # via astroid
zipp==0.5.1 # via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools==41.0.1 # via caniusepython3, tox, twine
11 changes: 7 additions & 4 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-e git+https://github.com/edx/[email protected]#egg=tincan==0.0.5.py.35
alabaster==0.7.12 # via sphinx
amqp==1.4.9 # via kombu
aniso8601==6.0.0
aniso8601==7.0.0
anyjson==0.3.3 # via kombu
asn1crypto==0.24.0 # via cryptography
babel==2.7.0 # via sphinx
Expand Down Expand Up @@ -41,7 +41,7 @@ djangorestframework==3.6.3
doc8==0.8.0
docutils==0.14
edx-django-oauth2-provider==1.3.5
edx-django-utils==1.0.3 # via edx-drf-extensions
edx-django-utils==1.0.5 # via edx-drf-extensions
edx-drf-extensions==2.3.1
edx-opaque-keys==0.4.4
edx-rbac==0.2.1
Expand Down Expand Up @@ -78,7 +78,7 @@ pyparsing==2.4.0 # via packaging
python-dateutil==2.8.0
python-slugify==3.0.2 # via code-annotations
pytz==2019.1
pyyaml==5.1 # via code-annotations
pyyaml==5.1.1 # via code-annotations
readme-renderer==24.0
requests==2.21.0
rest-condition==1.0.3 # via edx-drf-extensions
Expand All @@ -93,9 +93,12 @@ sphinx==1.8.5
sphinxcontrib-napoleon==0.6.1
sphinxcontrib-websupport==1.1.2 # via sphinx
stevedore==1.30.1 # via code-annotations, doc8, edx-opaque-keys
testfixtures==6.8.2
testfixtures==6.9.0
text-unidecode==1.2 # via python-slugify
typing==3.6.6 # via sphinx
unicodecsv==0.14.1
urllib3==1.24.3 # via requests
webencodings==0.5.1 # via html5lib

# The following packages are considered to be unsafe in a requirements file:
# setuptools==41.0.1 # via sphinx
7 changes: 5 additions & 2 deletions requirements/js_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ backports.functools-lru-cache==1.5 # via cheroot, jaraco.functools
cheroot==6.5.5 # via cherrypy
cherrypy==17.3.0
contextlib2==0.5.5 # via cherrypy
glob2==0.6 # via jasmine-core
glob2==0.7 # via jasmine-core
jaraco.functools==2.0 # via tempora
jasmine-core==2.99.1 # via jasmine
jasmine==2.9.0
jinja2==2.10.1 # via jasmine
markupsafe==1.1.1 # via jinja2
more-itertools==5.0.0 # via cheroot, cherrypy, jaraco.functools
ordereddict==1.1 # via jasmine-core
portend==2.4 # via cherrypy
portend==2.5 # via cherrypy
pytz==2019.1 # via tempora
pyyaml==3.10 # via jasmine
selenium==3.6.0 # via jasmine
six==1.12.0 # via cheroot, cherrypy, jasmine, more-itertools, tempora
tempora==1.14.1 # via portend
zc.lockfile==1.4 # via cherrypy

# The following packages are considered to be unsafe in a requirements file:
# setuptools==41.0.1 # via zc.lockfile
17 changes: 10 additions & 7 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-e git+https://github.com/edx/[email protected]#egg=tincan==0.0.5.py.35
alabaster==0.7.12 # via sphinx
amqp==1.4.9 # via kombu
aniso8601==6.0.0
aniso8601==7.0.0
anyjson==0.3.3 # via kombu
argparse==1.4.0 # via caniusepython3
asn1crypto==0.24.0 # via cryptography
Expand Down Expand Up @@ -54,7 +54,7 @@ djangorestframework==3.6.3
doc8==0.8.0
docutils==0.14
edx-django-oauth2-provider==1.3.5
edx-django-utils==1.0.3 # via edx-drf-extensions
edx-django-utils==1.0.5 # via edx-drf-extensions
edx-drf-extensions==2.3.1
edx-i18n-tools==0.4.8
edx-lint==1.3.0
Expand All @@ -74,7 +74,7 @@ futures==3.1.1
html5lib==1.0.1
idna==2.8 # via cryptography, requests
imagesize==1.1.0 # via sphinx
importlib-metadata==0.17 # via pluggy, pytest
importlib-metadata==0.18 # via pluggy, pytest
inflect==2.1.0 # via jinja2-pluralize
ipaddress==1.0.22 # via cryptography, faker
isort==4.3.20
Expand All @@ -94,7 +94,7 @@ path.py==8.2.1
pathlib2==2.3.3 # via importlib-metadata, pytest, pytest-django
pbr==5.2.1 # via stevedore
pillow==5.4.1
pip-tools==3.7.0
pip-tools==3.8.0
pkginfo==1.5.0.1 # via twine
pluggy==0.12.0 # via pytest, tox
pockets==0.7.2 # via sphinxcontrib-napoleon
Expand All @@ -117,11 +117,11 @@ pyparsing==2.4.0 # via packaging
pytest-catchlog==1.2.2
pytest-cov==2.7.1
pytest-django==3.5.0
pytest==4.6.2 # via pytest-catchlog, pytest-cov, pytest-django
pytest==4.6.3 # via pytest-catchlog, pytest-cov, pytest-django
python-dateutil==2.8.0
python-slugify==3.0.2 # via code-annotations
pytz==2019.1
pyyaml==5.1 # via code-annotations, edx-i18n-tools
pyyaml==5.1.1 # via code-annotations, edx-i18n-tools
readme-renderer==24.0
requests-toolbelt==0.9.1 # via twine
requests==2.21.0
Expand All @@ -140,7 +140,7 @@ sphinx==1.8.5
sphinxcontrib-napoleon==0.6.1
sphinxcontrib-websupport==1.1.2 # via sphinx
stevedore==1.30.1 # via code-annotations, doc8, edx-opaque-keys
testfixtures==6.8.2
testfixtures==6.9.0
text-unidecode==1.2 # via faker, python-slugify
toml==0.10.0 # via tox
tox-battery==0.5.1
Expand All @@ -156,3 +156,6 @@ webencodings==0.5.1 # via html5lib
wheel==0.33.4
wrapt==1.11.1 # via astroid
zipp==0.5.1 # via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools==41.0.1 # via caniusepython3, sphinx, tox, twine
12 changes: 6 additions & 6 deletions requirements/test-master.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
-e git+https://github.com/edx/[email protected]#egg=tincan==0.0.5.py.35
amqp==1.4.9 # via kombu
aniso8601==6.0.0
aniso8601==7.0.0
anyjson==0.3.3 # via kombu
asn1crypto==0.24.0 # via cryptography
atomicwrites==1.3.0 # via pytest
Expand Down Expand Up @@ -44,7 +44,7 @@ djangorestframework-oauth==1.1.0
djangorestframework-xml==1.3.0
djangorestframework==3.6.3
edx-django-oauth2-provider==1.3.5
edx-django-utils==1.0.3 # via edx-drf-extensions
edx-django-utils==1.0.5 # via edx-drf-extensions
edx-drf-extensions==2.3.1
edx-opaque-keys==0.4.4
edx-rbac==0.2.1
Expand All @@ -58,7 +58,7 @@ funcsigs==1.0.2 # via mock, pytest
future==0.17.1 # via pyjwkest
html5lib==1.0.1
idna==2.8 # via cryptography, requests
importlib-metadata==0.17 # via pluggy, pytest
importlib-metadata==0.18 # via pluggy, pytest
inflect==2.1.0 # via jinja2-pluralize
ipaddress==1.0.22 # via cryptography, faker
jinja2-pluralize==0.3.0 # via diff-cover
Expand Down Expand Up @@ -88,11 +88,11 @@ pyparsing==2.4.0 # via packaging
pytest-catchlog==1.2.2
pytest-cov==2.7.1
pytest-django==3.5.0
pytest==4.6.2 # via pytest-catchlog, pytest-cov, pytest-django
pytest==4.6.3 # via pytest-catchlog, pytest-cov, pytest-django
python-dateutil==2.8.0
python-slugify==3.0.2 # via code-annotations
pytz==2019.1
pyyaml==5.1 # via code-annotations
pyyaml==5.1.1 # via code-annotations
requests==2.21.0
responses==0.10.6
rest-condition==1.0.3 # via edx-drf-extensions
Expand All @@ -103,7 +103,7 @@ shortuuid==0.5.0 # via edx-django-oauth2-provider
six==1.12.0 # via bleach, cryptography, diff-cover, edx-drf-extensions, edx-opaque-keys, edx-rbac, faker, freezegun, html5lib, mock, more-itertools, packaging, pathlib2, pyjwkest, pytest, python-dateutil, responses, stevedore
slumber==0.7.1 # via edx-rest-api-client
stevedore==1.30.1 # via code-annotations, edx-opaque-keys
testfixtures==6.8.2
testfixtures==6.9.0
text-unidecode==1.2 # via faker, python-slugify
unicodecsv==0.14.1
urllib3==1.24.3 # via requests
Expand Down
12 changes: 6 additions & 6 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
-e git+https://github.com/edx/[email protected]#egg=tincan==0.0.5.py.35
amqp==1.4.9 # via kombu
aniso8601==6.0.0
aniso8601==7.0.0
anyjson==0.3.3 # via kombu
asn1crypto==0.24.0 # via cryptography
atomicwrites==1.3.0 # via pytest
Expand Down Expand Up @@ -44,7 +44,7 @@ djangorestframework-oauth==1.1.0
djangorestframework-xml==1.3.0
djangorestframework==3.6.3
edx-django-oauth2-provider==1.3.5
edx-django-utils==1.0.3 # via edx-drf-extensions
edx-django-utils==1.0.5 # via edx-drf-extensions
edx-drf-extensions==2.3.1
edx-opaque-keys==0.4.4
edx-rbac==0.2.1
Expand All @@ -58,7 +58,7 @@ funcsigs==1.0.2 # via mock, pytest
future==0.17.1 # via pyjwkest
html5lib==1.0.1
idna==2.8 # via cryptography, requests
importlib-metadata==0.17 # via pluggy, pytest
importlib-metadata==0.18 # via pluggy, pytest
inflect==2.1.0 # via jinja2-pluralize
ipaddress==1.0.22 # via cryptography, faker
jinja2-pluralize==0.3.0 # via diff-cover
Expand Down Expand Up @@ -88,11 +88,11 @@ pyparsing==2.4.0 # via packaging
pytest-catchlog==1.2.2
pytest-cov==2.7.1
pytest-django==3.5.0
pytest==4.6.2 # via pytest-catchlog, pytest-cov, pytest-django
pytest==4.6.3 # via pytest-catchlog, pytest-cov, pytest-django
python-dateutil==2.8.0
python-slugify==3.0.2 # via code-annotations
pytz==2019.1
pyyaml==5.1 # via code-annotations
pyyaml==5.1.1 # via code-annotations
requests==2.21.0
responses==0.10.6
rest-condition==1.0.3 # via edx-drf-extensions
Expand All @@ -103,7 +103,7 @@ shortuuid==0.5.0 # via edx-django-oauth2-provider
six==1.12.0 # via bleach, cryptography, diff-cover, edx-drf-extensions, edx-opaque-keys, edx-rbac, faker, freezegun, html5lib, mock, more-itertools, packaging, pathlib2, pyjwkest, pytest, python-dateutil, responses, stevedore
slumber==0.7.1 # via edx-rest-api-client
stevedore==1.30.1 # via code-annotations, edx-opaque-keys
testfixtures==6.8.2
testfixtures==6.9.0
text-unidecode==1.2 # via faker, python-slugify
unicodecsv==0.14.1
urllib3==1.24.3 # via requests
Expand Down
5 changes: 4 additions & 1 deletion requirements/travis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ contextlib2==0.5.5 # via importlib-metadata
coverage==4.5.3 # via codecov
filelock==3.0.12 # via tox
idna==2.8 # via requests
importlib-metadata==0.17 # via pluggy
importlib-metadata==0.18 # via pluggy
pathlib2==2.3.3 # via importlib-metadata
pluggy==0.12.0 # via tox
py==1.8.0 # via tox
Expand All @@ -25,3 +25,6 @@ tox==3.12.1
urllib3==1.25.3 # via requests
virtualenv==16.6.0 # via tox
zipp==0.5.1 # via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools==41.0.1 # via tox

0 comments on commit e5ba9a0

Please sign in to comment.