Update settings and calls to use the new Django storage API.

Review Request #13428 — Created Nov. 22, 2023 and submitted — Latest diff uploaded

Information

Djblets
release-5.x

Reviewers

Django 4.2 introduced a new way of configuring and accessing storage
backends. Rather than separate implementations for file storage and
static media storage, everything now goes through a STORAGES
backend dictionary and a storages instance dictionary.

We now configure these in our Djblets-provided settings and our test
settings, and update the dictionary for extension packaging. The
extension packaging will need further tests, as storage handler caches
can't reasonably be cleared (without a hack to clear cached properties),
but the old storage support appears to have also cached state. So it
should be fine, but testing will be needed as development continues.

The avatars tests has been updated to use the storages instance
dictionary instead of the deprecated get_storage_class() method.

This removes all storage-related warnings from the test storage-related
warnings from the test suite.

Unit tests pass.

Commits

Files