From 716f588a3314118e9b84ce5d1934bac7513e2abf Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Tue, 9 Nov 2021 14:45:00 +0100 Subject: [PATCH] Version 2.1.2 (#1259) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * extend testing matrix to Python-3.10 with Django-3.2 * make user and group autocomplete fields * Bump to version 2.1.2 * deactive python-3.10 for now * filter tox by gh-actions * set SECRET_KEY for testing * fix JS style checking complains * try quoting Python-3.10 * move SECRET_KEY into HELPER_SETTINGS * Remove Python-3.10 from matrix; lxml2 don’t work Co-authored-by: Jacob Rief --- .github/workflows/test.yml | 5 +++-- CHANGELOG.rst | 7 +++++++ filer/__init__.py | 2 +- filer/admin/permissionadmin.py | 1 + filer/static/filer/js/addons/dropzone.init.js | 2 +- setup.py | 5 +++++ tests/requirements/django-3.2.txt | 5 +++++ tests/settings.py | 1 + tox.ini | 15 +++++++++++++-- 9 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 tests/requirements/django-3.2.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c07c43f87..e5dc2ee11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,11 +8,12 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ 3.6, 3.7, 3.8, 3.9, ] + python-version: [ 3.6, 3.7, 3.8, 3.9 ] requirements-file: [ django-2.2.txt, django-3.0.txt, - django-3.1.txt + django-3.1.txt, + django-3.2.txt ] os: [ ubuntu-20.04, diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e20ec41ee..6a0880ec1 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,13 @@ CHANGELOG ========= +2.1.2 (2021-11-09) +================== + +* In Folder permissions, make user and group autocomplete fields. +* Extent testing matrix to Python-3.10. + + 2.1.1 (2021-11-03) ================== diff --git a/filer/__init__.py b/filer/__init__.py index 2f5004914..f51a6c99d 100644 --- a/filer/__init__.py +++ b/filer/__init__.py @@ -14,6 +14,6 @@ 10. twine upload dist/django-filer-{new version}.tar.gz """ -__version__ = '2.1.1' +__version__ = '2.1.2' default_app_config = 'filer.apps.FilerConfig' diff --git a/filer/admin/permissionadmin.py b/filer/admin/permissionadmin.py index 5730102ff..2ea1a2938 100644 --- a/filer/admin/permissionadmin.py +++ b/filer/admin/permissionadmin.py @@ -13,6 +13,7 @@ class PermissionAdmin(admin.ModelAdmin): list_filter = ['group'] list_display = ['__str__', 'folder', 'user'] search_fields = ['user__username', 'group__name', 'folder__name'] + autocomplete_fields = ['user', 'group'] def get_queryset(self, request): qs = super(PermissionAdmin, self).get_queryset(request) diff --git a/filer/static/filer/js/addons/dropzone.init.js b/filer/static/filer/js/addons/dropzone.init.js index 3ce09396a..bb0f5f6d6 100644 --- a/filer/static/filer/js/addons/dropzone.init.js +++ b/filer/static/filer/js/addons/dropzone.init.js @@ -131,7 +131,7 @@ djQuery(function ($) { }); }, error: function (file, msg, response) { - if(response && response.error){ + if (response && response.error) { msg += ' ; ' + response.error; } showError(file.name + ': ' + msg); diff --git a/setup.py b/setup.py index 5b33332e7..5df5a25f8 100644 --- a/setup.py +++ b/setup.py @@ -24,14 +24,18 @@ 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Framework :: Django', 'Framework :: Django :: 2.2', 'Framework :: Django :: 3.0', 'Framework :: Django :: 3.1', + 'Framework :: Django :: 3.2', 'Framework :: Django CMS', 'Framework :: Django CMS :: 3.6', 'Framework :: Django CMS :: 3.7', 'Framework :: Django CMS :: 3.8', + 'Framework :: Django CMS :: 3.9', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development', @@ -53,6 +57,7 @@ include_package_data=True, zip_safe=False, install_requires=REQUIREMENTS, + python_requires='>=3.6', classifiers=CLASSIFIERS, test_suite='tests.settings.run', ) diff --git a/tests/requirements/django-3.2.txt b/tests/requirements/django-3.2.txt new file mode 100644 index 000000000..89d77bb78 --- /dev/null +++ b/tests/requirements/django-3.2.txt @@ -0,0 +1,5 @@ +-r base.txt + +django>=3.2,<4 +django-mptt>=0.9.1 +django_polymorphic>=2,<3.1 diff --git a/tests/settings.py b/tests/settings.py index b611a8cc1..bdd005b46 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -53,6 +53,7 @@ 'FILE_UPLOAD_TEMP_DIR': mkdtemp(), 'TEMPLATE_DIRS': (os.path.join(BASE_DIR, 'django-filer', 'filer', 'utils', 'templates'),), 'FILER_CANONICAL_URL': 'test-path/', + 'SECRET_KEY': '__secret__', } if os.environ.get('CUSTOM_IMAGE', False): HELPER_SETTINGS['FILER_IMAGE_MODEL'] = os.environ.get('CUSTOM_IMAGE') diff --git a/tox.ini b/tox.ini index 51c1c9e5d..2cfc748fa 100644 --- a/tox.ini +++ b/tox.ini @@ -6,8 +6,18 @@ envlist = frontend py{36,37,38}-dj{22}-swap py{36,37,38}-dj{22}-noswap - py{36,37,38}-dj{30,31}-swap - py{36,37,38}-dj{30,31}-noswap + py{36,37,38,39}-dj{30,31}-swap + py{36,37,38,39}-dj{30,31}-noswap + py{36,37,38,39,310}-dj32-swap + py{36,37,38,39,310}-dj32-noswap + +[gh-actions] +python = + 3.6: py36 + 3.7: py37 + 3.8: py38 + 3.9: py39 + 3.10: py310 skip_missing_interpreters=True @@ -45,6 +55,7 @@ deps = dj22: -r tests/requirements/django-2.2.txt dj30: -r tests/requirements/django-3.0.txt dj31: -r tests/requirements/django-3.1.txt + dj32: -r tests/requirements/django-3.2.txt commands = {envpython} --version {env:COMMAND:coverage} erase