Skip to content

meringue.conf.default_settings ¤

UPLOAD_RENAME_HANDLER module-attribute ¤

UPLOAD_RENAME_HANDLER: Final[str] = (
    "meringue.core.upload_handlers.rename_handler"
)

Path to method for renaming images on upload

COP_YEAR module-attribute ¤

COP_YEAR: Final[int] = None

Project start year for the copyright tag

COP_YEARS_DIFF module-attribute ¤

COP_YEARS_DIFF: Final[int] = 10

Difference in years for which it is necessary to display the range of years

Specify 1 to display the period for the second year.

CRYPTO_KEY module-attribute ¤

CRYPTO_KEY: Final[str] = SECRET_KEY[:32]

Encryption key

FRONTEND_URLS module-attribute ¤

FRONTEND_URLS: Final[dict] = None

A dict of links to the frontend

FRONTEND_DOMAIN module-attribute ¤

FRONTEND_DOMAIN: Final[str] = None

Domain for generating absolute links

API_ENABLE_ROOT_VIEW module-attribute ¤

API_ENABLE_ROOT_VIEW: Final[bool] = DEBUG

Option to enable or disable the root view of the Router

THUMBNAIL_GENERATOR_CLASS module-attribute ¤

THUMBNAIL_GENERATOR_CLASS: Final[str] = (
    "meringue.thumbnail.generators.Thumbnailer"
)

Thumbnail generator class.

THUMBNAIL_STORAGE_GETTER module-attribute ¤

THUMBNAIL_STORAGE_GETTER: Final[str] = (
    "meringue.thumbnail.storage.get_storage"
)

Dotted path to a method that returns a store.

THUMBNAIL_IMAGE_CLASS module-attribute ¤

THUMBNAIL_IMAGE_CLASS: Final[str] = (
    "meringue.thumbnail.images.ThumbnailImage"
)

Thumbnail image class.

THUMBNAIL_DIR module-attribute ¤

THUMBNAIL_DIR: Final[Path] = Path(MEDIA_ROOT) / Path(
    "m/thumbnail"
)

Directory for saving thhumbnails.

THUMBNAIL_URL module-attribute ¤

THUMBNAIL_URL: Final[str] = urljoin(
    MEDIA_URL, "m/thumbnail"
)

Url where thumbnails will be available.

THUMBNAIL_SAVE_PARAMS_BY_FORMAT module-attribute ¤

THUMBNAIL_SAVE_PARAMS_BY_FORMAT: Final[dict[str, dict]] = {
    "GIF": {"optimize": True},
    "JPEG": {"quality": 85, "optimize": True},
    "PNG": {"optimize": True, "compress_level": 5},
    "TIFF": {"quality": 85},
    "WEBP": {"quality": 85},
}

List of default options for saving thumbnails images by format.

THUMBNAIL_DEFAULT_FORMAT module-attribute ¤

THUMBNAIL_DEFAULT_FORMAT: Final[str] = 'PNG'

Default thumbnail image format.

PROTECTED_SERVE_WITH_NGINX module-attribute ¤

PROTECTED_SERVE_WITH_NGINX: Final[bool] = not DEBUG

The option implies the distribution of protected files by nginx. Instead of serving the file in response.

The view x_accel_redirect_view adds the X-Accel-Redirect header with a link to the file.

PROTECTED_NGINX_LOCATION_GETTER module-attribute ¤

PROTECTED_NGINX_LOCATION_GETTER: Final[str] = (
    "meringue.protected.utils.nginx_location_getter"
)

Default getter for the link to the file where nginx should serve it after access verification.