Configuration¶
Django Anchor exposes several settings which can be changed to tune the
application to your needs. Define these settings under ANCHOR in your project
settings like this:
ANCHOR = {
'DEFAULT_STORAGE_BACKEND': 'my_storage_backend',
}
- class anchor.settings.AnchorSettings(*args, **kwargs)¶
- ADMIN_UPLOAD_TO: str = 'admin-uploads/%Y/%m/%d/'¶
The prefix to use for files uploaded via the Django admin interface.
- DEFAULT_MIME_TYPE: str = 'application/octet-stream'¶
The default MIME type to use for files when it cannot be guessed from the file extension.
- DEFAULT_STORAGE_BACKEND: str = 'default'¶
The default storage backend to use for Blobs when no other storage backend is specified.
- DEFAULT_VARIANT_FORMAT: str = 'webp'¶
The default format to use for variants.
- FILE_SYSTEM_BACKEND_EXPIRATION: timedelta = datetime.timedelta(seconds=3600)¶
How long URLs generated for the file system backend should be valid for.
- IMAGE_PROCESSOR: str = 'anchor.services.processors.pillow.PillowProcessor'¶
The image processor to use for image transformations.
- TRACK_VARIANTS: bool = True¶
Store variant records in the database.