Skip to main content

Introduction

statusmessages provides an easy way of handling internationalized status messages managed via an BrowserRequest adapter storing status messages in client-side cookies.

It is quite common to write status messages which should be shown to the user after some action. These messages of course should be internationalized. As these messages normally are defined in Python code, the common way to i18n-ize these in Zope is to use zope.i18n Messages. Messages are complex objects consisting of a translation domain and a default unicode text and might have an additional mapping dict and a distinct id.

The usual way to provide status messages in CMF/Plone has been to add a “?portal_status_messages=some%20text” to the URL. While this has some usability problems it also isn’t possible to i18n-ize these in the common way, as the URL is currently limited to the ASCII charset, but an encoding providing support for the full unicode range is required.

The solution provided by this module is to store the status messages inside a cookie. In version 1.x a server side session like storage has been used, but this turned out not to be caching friendly for the usual web caching strategies.

Changelog

6.0.0 (2026-05-18)

Internal:

  • Update configuration files. [plone devs]

6.0.0a1 (2025-11-20)

Breaking changes:

  • Replace pkg_resources namespace with PEP 420 native namespace. Support only Plone 6.2 and Python 3.10+. (#3928)

5.0.7 (2025-09-24)

Internal:

  • Move distribution to src layout [gforcada] (#4217)

5.0.6 (2023-07-14)

Internal:

  • Update configuration files. [plone devs] (cc314a2b)

5.0.5 (2020-04-23)

Bug fixes:

  • Minor packaging updates. (#1)

5.0.4 (2018-09-23)

Bug fixes:

  • Use Umlaut ä in tests in order to check string/bytes handling. Refactor test_encoding to unittest. [jensens]

5.0.3 (2018-06-21)

Bug fixes:

  • Python 3 compatibility fixes. [pbauer]

5.0.2 (2018-02-05)

New features:

  • Add Python 2 / 3 compatibility [davilima6]

5.0.1 (2017-11-26)

Bug fixes:

  • Fix issue where encoding and decoding of statusmessages into cookie raised exception, because of TypeError: Struct() argument 1 must be string, not unicode [datakurre]

5.0 (2017-08-04)

Breaking changes:

  • Remove python 2.6 (and thus Plone 4.3.x) compatibility. [tomgross]

New features:

  • Python 3 compatibility [tomgross]

Bug fixes:

  • Update code to follow Plone styleguide. [gforcada]

4.1.2 (2017-02-12)

Bug fixes:

  • Fix deprecated import in test. [pbauer]

4.1.1 (2016-08-11)

Bug fixes:

  • Use zope.interface decorator. [gforcada]

4.1.0 (2016-05-25)

New features:

  • Convert tests to plone.app.testing. [do3cc]

4.0 - 2010-07-18

  • Use the standard libraries doctest module. [hannosch]

4.0b1 - 2010-03-01

  • Stopped the cookie from being expired if a redirect (301, 302) or not-modified (304) response is sent. This means that if you set a redirect and then (superfluously) render a template that would show the status message, you won’t lose the message. [optilude]

4.0a2 - 2009-12-17

  • Changed the default type of a new message from the empty string to info. [hannosch]

4.0a1 - 2009-12-17

  • Simplified the interface to use simpler add/show method names while keeping backwards compatibility. [hannosch]

  • More code simplification. Make the code itself independent of Zope2. [hannosch]

  • Removed a five:implements statement, as the ZPublisher.HTTPRequest is always an IBrowserRequest in Zope 2.12. [hannosch]

  • This version depends on Zope 2.12+. [hannosch]

  • Package metadata cleanup. [hannosch]

  • Declare package and test dependencies. [hannosch]

3.0.3 - 2007-11-24

  • Use binascii.b2a_base64 instead of base64.encodestring; the former doesn’t inject newlines every 76 characters, which makes it easier to strip just the last one (slightly faster). This fixes tickets #7323 and #7325. [mj]

3.0.2 - 2007-11-06

3.0.1 - 2007-10-07

  • Added the IAttributeAnnotatable interface assignment for the request to this package as well as the inclusion of the zope.annotation, as we rely on it. [hannosch]

3.0 - 2007-08-09

  • No changes. [hannosch]

3.0rc1 - 2007-07-10

  • Removed useless setup.cfg. [hannosch]

3.0b2 - 2007-03-23

  • Fixed duplicate message bug. Showing identical messages to the end user more than once, doesn’t make any sense. This closes http://dev.plone.org/plone/ticket/6109. [hannosch]

  • Added ‘s support for statusmessages without a redirect. This uses annotations on the request instead of direct values, so we avoid the possibility of sneaking those in via query strings. [tomster, hannosch]

3.0b1 - 2007-03-05

  • Converted to a package in the Products namespace. [hannosch]

  • Added explicit translation of statusmessages before storing them in the cookie. This makes sure we have a reasonable context to base the translation on. [hannosch]

  • Changed license to BSD, to make it possible to include it as a dependency in Archetypes. [hannosch]

2.1 - 2006-10-25

  • Updated test infrastructure, removed custom testrunner. [hannosch]

  • Fixed deprecation warning for the zcml content directive. [hannosch]

2.0 - 2006-05-15

  • Total reimplementation using cookies instead of a server-side in-memory storage to store status messages. The reasoning behind this change is that the former approach didn’t play well with web caching strategies and added an additional burden in ZEO environments (having to use load-balancers, which are able to identify users and keep them connected to the same ZEO server). [hannosch]

1.1 - 2006-02-13

  • Added tests for ThreadSafeDict. [hannosch]

  • Fixed serious memory leak and did some code improvements. [hannosch, alecm]

1.0 - 2006-01-26

  • Initial implementation [hannosch]

Release files for Products.statusmessages 6.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Products.statusmessages 6.0.0
File Size Uploaded
products_statusmessages-6.0.0.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Products.statusmessages 6.0.0
File Interpreter ABI Platform
products_statusmessages-6.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.5 kB

Release files / products_statusmessages-6.0.0.tar.gz

Download URL products_statusmessages-6.0.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1e8961c35e51e75afb5f67c44f77901a3df9326a1d2cae8305e84b985f61f99f
BLAKE2b-256 checksum
How to use checksums
8e6d05db5a79009efd97edd214d22021538c25bec50f9bc16ae59eda79b5bf81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / products_statusmessages-6.0.0-py3-none-any.whl

Download URL products_statusmessages-6.0.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7616dfb463532681ba81e02b593edf3c626f447fe2819f472e2db9a2729c00ab
BLAKE2b-256 checksum
How to use checksums
e829a8d049b28f9da190f24f441d8023f27a5cee85a36a19cba471d9761ddd76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page