class storage.fallback.FallbackStorage
This class first uses CookieStorage
, and falls back to using SessionStorage
for the messages that could not fit in a single cookie. It also requires Django’s contrib.sessions
application.
This behavior avoids writing to the session whenever possible. It should provide the best performance in the general case.
FallbackStorage
is the default storage class. If it isn’t suitable to your needs, you can select another storage class by setting MESSAGE_STORAGE
to its full import path, for example:
MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'
Please login to continue.