diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0ebb0d..66c6ea7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [3.7, 3.8, 3.9] + python: [3.8, 3.9, "3.10", "3.11"] steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python }} @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [3.9] + python: ["3.11"] steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python }} @@ -33,7 +33,7 @@ jobs: with: python-version: ${{ matrix.python }} - name: Install flake8 - run: pip install flake8 + run: pip install flake8 flake8-print - name: Run flake8 # Run tox using the version of Python in `PATH` # run: tox -e py${{ matrix.python }}-${{ matrix.django }} diff --git a/filer_addons/filer_gui/admin/api.py b/filer_addons/filer_gui/admin/api.py index 34eaac2..d75d2ea 100644 --- a/filer_addons/filer_gui/admin/api.py +++ b/filer_addons/filer_gui/admin/api.py @@ -1,6 +1,6 @@ import django from django import forms -from django.conf.urls import url +from django.urls import re_path from django.contrib import admin # from django.core.urlresolvers import reverse from django.http.response import JsonResponse @@ -74,12 +74,12 @@ class FilerGuiAdmin(admin.ModelAdmin): def get_urls(self): urls = [ - url( + re_path( r'^file-detail-json/$', self.admin_site.admin_view(self.file_detail_json_view), name='file_detail_json_for_id' ), - url( + re_path( r'^file-upload/$', self.admin_site.admin_view(self.file_upload_view), name='file_upload' diff --git a/filer_addons/filer_gui/admin/upload_inline.py b/filer_addons/filer_gui/admin/upload_inline.py index eeb381f..ad55005 100644 --- a/filer_addons/filer_gui/admin/upload_inline.py +++ b/filer_addons/filer_gui/admin/upload_inline.py @@ -7,7 +7,7 @@ from django.contrib import admin from django.core.exceptions import ImproperlyConfigured from django.forms import widgets -from django.utils.encoding import force_text +from django.utils.encoding import force_str from django.utils.html import mark_safe from django.utils.translation import gettext_lazy as _ @@ -81,7 +81,7 @@ def html_data_fields(self): 'file_field': self.get_file_field(), 'file_type': self.get_file_type(), 'messages': { - 'generic_upload_error': force_text(_('Upload error')), + 'generic_upload_error': force_str(_('Upload error')), }, } data_fields = '{} data-uploadinline=\'{}\''.format( diff --git a/filer_addons/filer_gui/change_list/templates/admin/filer/folder/directory_table.html b/filer_addons/filer_gui/change_list/templates/admin/filer/folder/directory_table.html index 2ec6c8c..28b7325 100644 --- a/filer_addons/filer_gui/change_list/templates/admin/filer/folder/directory_table.html +++ b/filer_addons/filer_gui/change_list/templates/admin/filer/folder/directory_table.html @@ -139,7 +139,7 @@ {{ file.owner|default:"n/a" }}