From 793a74c7ba300f0991b4b9109213286a01df88bf Mon Sep 17 00:00:00 2001 From: Fabian Braun Date: Tue, 20 Aug 2024 14:17:01 +0200 Subject: [PATCH] Update settings --- filer/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/filer/settings.py b/filer/settings.py index 09e6a5064..661a4a2e6 100644 --- a/filer/settings.py +++ b/filer/settings.py @@ -2,7 +2,6 @@ import os from django.conf import settings -from django.core.exceptions import ImproperlyConfigured from django.utils.module_loading import import_string as get_storage_class from django.utils.translation import gettext_lazy as _ @@ -38,9 +37,10 @@ FILER_PAGINATE_BY = getattr(settings, 'FILER_PAGINATE_BY', 100) +if hasattr(settings, "FILER_ADMIN_ICON_SIZES"): + logger.warning("FILER_ADMIN_ICON_SIZES is deprecated and will be removed in the future.") + _ICON_SIZES = getattr(settings, 'FILER_ADMIN_ICON_SIZES', ('16', '32', '48', '64')) -if not _ICON_SIZES: - raise ImproperlyConfigured('Please, configure FILER_ADMIN_ICON_SIZES') # Reliably sort by integer value, but keep icon size as string. # (There is some code in the wild that depends on this being strings.) FILER_ADMIN_ICON_SIZES = [str(i) for i in sorted([int(s) for s in _ICON_SIZES])]