Skip to content

Commit

Permalink
Update settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Aug 20, 2024
1 parent 96c94e4 commit 793a74c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions filer/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 _

Expand Down Expand Up @@ -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])]
Expand Down

0 comments on commit 793a74c

Please sign in to comment.