django-cms / django-filer

File and Image Management Application for django
https://django-filer.readthedocs.io/
Other
1.73k stars 574 forks source link

feat: Accept new `STORAGES` setting, introduced in Django 4.2 #1472

Closed fsbraun closed 1 month ago

fsbraun commented 1 month ago

Description

Fixes #1458.

Django 4.2 introduced the new STORAGES setting. The historic DEFAULT_FILE_STORAGE setting is deprecated and will be removed in Django 5.1.

This PR makes use of the STORAGES setting if present, otherwise falls back to DEFAULT_FILE_STORAGE for compatibility with older Django versions.

https://github.com/fsbraun/django-filer/blob/984a45b71654dc5e4b349b076a726aaa96988d86/filer/settings.py#L62-L65

Also, this PR includes the changes from pyupgrade for Python 3.8+

Related resources

Checklist