diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bf6464912..136b3ef29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,20 +8,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.10', '3.11', '3.12'] requirements-file: [ - django-3.2.txt, - django-4.0.txt, - django-4.1.txt, django-4.2.txt, django-5.0.txt, + django-main.txt, ] custom-image-model: [false, true] - exclude: - - requirements-file: django-5.0.txt - python-version: 3.8 - - requirements-file: django-5.0.txt - python-version: 3.9 os: [ ubuntu-20.04, ] diff --git a/filer/models/filemodels.py b/filer/models/filemodels.py index ad77031c2..0a6cb4077 100644 --- a/filer/models/filemodels.py +++ b/filer/models/filemodels.py @@ -344,19 +344,24 @@ def has_generic_permission(self, request, permission_type): else: return False - def get_admin_change_url(self): + def get_admin_url(self, action): return reverse( - 'admin:{}_{}_change'.format( + 'admin:{}_{}_{}'.format( self._meta.app_label, self._meta.model_name, + action ), args=(self.pk,) ) + def get_admin_change_url(self): + return self.get_admin_url("change") + + def get_admin_expand_view_url(self): + return self.get_admin_url("expand") + def get_admin_delete_url(self): - return reverse( - f'admin:{self._meta.app_label}_{self._meta.model_name}_delete', - args=(self.pk,)) + return self.get_admin_url("delete") @property def url(self): diff --git a/filer/templates/admin/filer/folder/directory_table_list.html b/filer/templates/admin/filer/folder/directory_table_list.html index 2ba08c477..096c34bb5 100644 --- a/filer/templates/admin/filer/folder/directory_table_list.html +++ b/filer/templates/admin/filer/folder/directory_table_list.html @@ -139,7 +139,7 @@