CookieStorage
Store messages in a cookie.
Attributes
| Attribute | Type | Description |
|---|---|---|
| cookie_name | string = "messages" | The name of the HTTP cookie used to store the serialized message data. |
| max_cookie_size | integer = 2048 | The maximum allowed size in bytes for the session cookie to ensure it fits within HTTP header limits. |
| not_finished | string = "messagesnotfinished" | A sentinel string value appended to the message list to indicate that not all messages could be stored due to size constraints. |
| not_finished_json | string = json.dumps("messagesnotfinished") | The JSON-encoded version of the not_finished sentinel value used during the serialization process. |
| key_salt | string = "django.contrib.messages" | The salt value used by the signer to provide cryptographic protection for the cookie data. |
Constructor
Signature
def CookieStorage(
*args: any,
**kwargs: any
)
Parameters
| Name | Type | Description |
|---|---|---|
| *args | any | Variable length argument list passed to the base storage constructor. |
| **kwargs | any | Arbitrary keyword arguments passed to the base storage constructor. |