Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
May 19, 2024

Conversation

fsbraun
Copy link
Sponsor Member

@fsbraun fsbraun commented May 19, 2024

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

  • I have opened this pull request against master
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

@fsbraun fsbraun requested review from jrief and a team May 19, 2024 16:10
@fsbraun fsbraun merged commit 1d709ae into django-cms:master May 19, 2024
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEFAULT_FILE_STORAGE is deprecated and will be removed in Django 5.1
2 participants