Store blobs into a database table.
In your configuration add the dj-bucket app to the installed apps:
INSTALLED_APPS: = [
"dj_bucket",
]
# Bucket base path no starting and no ending slash
BUCKET_PATH="bucket"Then make sure a database backend is setup, for testing you can use the SQLite:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}Add the bucket URL to your urls.py:
from dj_bucket.urls import urlpatterns as dj_bucket_urls
urlpatterns = [
path("", include(dj_bucket_urls)),
...
]Run the Django database migrations to create the table that will store the blobs.
With wagtail you need to declare the storage in the STORAGES variable:
STORAGES = {
"default": {
"BACKEND": "dj_bucket.models.Bucket",
}
}